diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-04-26 15:39:50 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-04-26 15:39:50 +0200 |
commit | 1b21e0b643f37675683b09b9e528721cb7df74e5 (patch) | |
tree | faec39247d6a83f93d289190e2e37ba98b6159ae /src | |
parent | c15e7951180d954ca584a95206543e8997b3a7d4 (diff) | |
download | gnunet-1b21e0b643f37675683b09b9e528721cb7df74e5.tar.gz gnunet-1b21e0b643f37675683b09b9e528721cb7df74e5.zip |
misc bugfixes
Diffstat (limited to 'src')
-rw-r--r-- | src/gnsrecord/gnsrecord_crypto.c | 2 | ||||
-rw-r--r-- | src/namestore/gnunet-zoneimport.c | 15 | ||||
-rw-r--r-- | src/namestore/namestore_api.c | 3 |
3 files changed, 13 insertions, 7 deletions
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c index 27c83b90e..d9fe2ae40 100644 --- a/src/gnsrecord/gnsrecord_crypto.c +++ b/src/gnsrecord/gnsrecord_crypto.c | |||
@@ -236,7 +236,7 @@ GNUNET_GNSRECORD_block_create2 (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | |||
236 | static struct KeyCacheLine cache[CSIZE]; | 236 | static struct KeyCacheLine cache[CSIZE]; |
237 | struct KeyCacheLine *line; | 237 | struct KeyCacheLine *line; |
238 | 238 | ||
239 | line = &cache[(*(unsigned int *) key) ^ CSIZE]; | 239 | line = &cache[(*(unsigned int *) key) % CSIZE]; |
240 | if (0 != memcmp (&line->key, | 240 | if (0 != memcmp (&line->key, |
241 | key, | 241 | key, |
242 | sizeof (*key))) | 242 | sizeof (*key))) |
diff --git a/src/namestore/gnunet-zoneimport.c b/src/namestore/gnunet-zoneimport.c index 779df695b..6622a7676 100644 --- a/src/namestore/gnunet-zoneimport.c +++ b/src/namestore/gnunet-zoneimport.c | |||
@@ -1438,7 +1438,6 @@ queue (const char *hostname) | |||
1438 | return; | 1438 | return; |
1439 | } | 1439 | } |
1440 | 1440 | ||
1441 | pending++; | ||
1442 | hlen = strlen (hostname) + 1; | 1441 | hlen = strlen (hostname) + 1; |
1443 | req = GNUNET_malloc (sizeof (struct Request) + hlen); | 1442 | req = GNUNET_malloc (sizeof (struct Request) + hlen); |
1444 | req->zone = zone; | 1443 | req->zone = zone; |
@@ -1503,7 +1502,13 @@ iterate_zones (void *cls) | |||
1503 | static struct Zone *last; | 1502 | static struct Zone *last; |
1504 | 1503 | ||
1505 | (void) cls; | 1504 | (void) cls; |
1506 | zone_it = NULL; | 1505 | if (NULL != zone_it) |
1506 | { | ||
1507 | zone_it = NULL; | ||
1508 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1509 | "Finished iteration over zone `%s'!\n", | ||
1510 | last->domain); | ||
1511 | } | ||
1507 | GNUNET_assert (NULL != zone_tail); | 1512 | GNUNET_assert (NULL != zone_tail); |
1508 | if (zone_tail == last) | 1513 | if (zone_tail == last) |
1509 | { | 1514 | { |
@@ -1515,15 +1520,15 @@ iterate_zones (void *cls) | |||
1515 | NULL); | 1520 | NULL); |
1516 | GNUNET_CONTAINER_multihashmap_destroy (ns_pending); | 1521 | GNUNET_CONTAINER_multihashmap_destroy (ns_pending); |
1517 | ns_pending = NULL; | 1522 | ns_pending = NULL; |
1518 | GNUNET_assert (NULL == t); | ||
1519 | t = GNUNET_SCHEDULER_add_now (&process_queue, | ||
1520 | NULL); | ||
1521 | return; | 1523 | return; |
1522 | } | 1524 | } |
1523 | if (NULL == last) | 1525 | if (NULL == last) |
1524 | last = zone_head; | 1526 | last = zone_head; |
1525 | else | 1527 | else |
1526 | last = last->next; | 1528 | last = last->next; |
1529 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1530 | "Starting iteration over zone `%s'!\n", | ||
1531 | last->domain); | ||
1527 | ns_iterator_trigger_next = 1; | 1532 | ns_iterator_trigger_next = 1; |
1528 | zone_it = GNUNET_NAMESTORE_zone_iteration_start (ns, | 1533 | zone_it = GNUNET_NAMESTORE_zone_iteration_start (ns, |
1529 | &last->key, | 1534 | &last->key, |
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 65d3d75d0..ab356838b 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -1293,7 +1293,8 @@ GNUNET_NAMESTORE_zone_iterator_next (struct GNUNET_NAMESTORE_ZoneIterator *it, | |||
1293 | struct GNUNET_MQ_Envelope *env; | 1293 | struct GNUNET_MQ_Envelope *env; |
1294 | 1294 | ||
1295 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1295 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1296 | "Sending ZONE_ITERATION_NEXT message\n"); | 1296 | "Sending ZONE_ITERATION_NEXT message with limit %llu\n", |
1297 | (unsigned long long) limit); | ||
1297 | env = GNUNET_MQ_msg (msg, | 1298 | env = GNUNET_MQ_msg (msg, |
1298 | GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT); | 1299 | GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT); |
1299 | msg->gns_header.r_id = htonl (it->op_id); | 1300 | msg->gns_header.r_id = htonl (it->op_id); |