misc bugfixes
authorChristian Grothoff <christian@grothoff.org>
Thu, 26 Apr 2018 13:39:50 +0000 (15:39 +0200)
committerChristian Grothoff <christian@grothoff.org>
Thu, 26 Apr 2018 13:39:50 +0000 (15:39 +0200)
src/gnsrecord/gnsrecord_crypto.c
src/namestore/gnunet-zoneimport.c
src/namestore/namestore_api.c

index 27c83b90efd67f91e21e853696d652851e4f128d..d9fe2ae40a566d89acbbcab1ffe15bbeeae7ab9f 100644 (file)
@@ -236,7 +236,7 @@ GNUNET_GNSRECORD_block_create2 (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
   static struct KeyCacheLine cache[CSIZE];
   struct KeyCacheLine *line;
 
-  line = &cache[(*(unsigned int *) key) ^ CSIZE];
+  line = &cache[(*(unsigned int *) key) % CSIZE];
   if (0 != memcmp (&line->key,
                    key,
                    sizeof (*key)))
index 779df695b7dc2544fb30155e3ae85615bac65c66..6622a76765cda8209ac347c296a5866423f8b0b1 100644 (file)
@@ -1438,7 +1438,6 @@ queue (const char *hostname)
     return;
   }
 
-  pending++;
   hlen = strlen (hostname) + 1;
   req = GNUNET_malloc (sizeof (struct Request) + hlen);
   req->zone = zone;
@@ -1503,7 +1502,13 @@ iterate_zones (void *cls)
   static struct Zone *last;
 
   (void) cls;
-  zone_it = NULL;
+  if (NULL != zone_it)
+  {
+    zone_it = NULL;
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Finished iteration over zone `%s'!\n",
+                last->domain);
+  }
   GNUNET_assert (NULL != zone_tail);
   if (zone_tail == last)
   {
@@ -1515,15 +1520,15 @@ iterate_zones (void *cls)
                                            NULL);
     GNUNET_CONTAINER_multihashmap_destroy (ns_pending);
     ns_pending = NULL;
-    GNUNET_assert (NULL == t);
-    t = GNUNET_SCHEDULER_add_now (&process_queue,
-                                  NULL);
     return;
   }
   if (NULL == last)
     last = zone_head;
   else
     last = last->next;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Starting iteration over zone `%s'!\n",
+              last->domain);
   ns_iterator_trigger_next = 1;
   zone_it = GNUNET_NAMESTORE_zone_iteration_start (ns,
                                                    &last->key,
index 65d3d75d0f209cedf19a057d199445a6546b3d0b..ab356838b7e3bf364217c0f88d90784f3abc338d 100644 (file)
@@ -1293,7 +1293,8 @@ GNUNET_NAMESTORE_zone_iterator_next (struct GNUNET_NAMESTORE_ZoneIterator *it,
   struct GNUNET_MQ_Envelope *env;
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Sending ZONE_ITERATION_NEXT message\n");
+       "Sending ZONE_ITERATION_NEXT message with limit %llu\n",
+       (unsigned long long) limit);
   env = GNUNET_MQ_msg (msg,
                        GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT);
   msg->gns_header.r_id = htonl (it->op_id);