- fixes
authorMatthias Wachs <wachs@net.in.tum.de>
Thu, 15 Mar 2012 13:47:51 +0000 (13:47 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Thu, 15 Mar 2012 13:47:51 +0000 (13:47 +0000)
src/namestore/gnunet-service-namestore.c
src/namestore/namestore_api.c

index dc81ccea39dd68a60ed57e48a557fc269cef319f..bfdae2603804bbfaf650bdacdf6190016cc9bbbc 100644 (file)
@@ -183,8 +183,8 @@ int write_key_to_file (const char *filename, struct GNUNET_NAMESTORE_CryptoConta
     LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename);
   GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd));
 
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-       _("Stored zonekey for zone `%s' in file `%s'\n"),GNUNET_h2s(&c->zone), c->filename);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+       _("Stored zonekey for zone `%s' in file `%s'\n"), GNUNET_h2s(&c->zone), c->filename);
   return GNUNET_OK;
 }
 
@@ -1470,7 +1470,7 @@ void zone_iteration_proc (void *cls,
     memcpy (name_tmp, name, name_len);
     memcpy (rd_tmp, rd_ser, rd_ser_len);
 
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending empty `%s' message with size %u\n", "ZONE_ITERATION_RESPONSE", msg_size);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message with size %u\n", "ZONE_ITERATION_RESPONSE", msg_size);
     GNUNET_SERVER_notification_context_unicast (snc, nc->client, (const struct GNUNET_MessageHeader *) zir_msg, GNUNET_NO);
     GNUNET_free (zir_msg);
   }
index 85f14cdcfe95518a3b289cf785c001fc05be450f..ddf3742db2b335f2633fc5d111094c9e11b3fb08 100644 (file)
@@ -1544,6 +1544,15 @@ GNUNET_NAMESTORE_zone_iterator_next (struct GNUNET_NAMESTORE_ZoneIterator *it)
 
   GNUNET_assert (NULL != it);
   h = it->h;
+  struct GNUNET_NAMESTORE_ZoneIterator *tmp = it->h->z_head;
+
+  while (tmp != NULL)
+  {
+    if (tmp == it)
+      break;
+    tmp = tmp->next;
+  }
+  GNUNET_assert (NULL != tmp);
 
   /* set msg_size*/
   msg_size = sizeof (struct ZoneIterationNextMessage);
@@ -1578,6 +1587,15 @@ GNUNET_NAMESTORE_zone_iteration_stop (struct GNUNET_NAMESTORE_ZoneIterator *it)
   struct PendingMessage *pe;
   size_t msg_size = 0;
   struct GNUNET_NAMESTORE_Handle *h = it->h;
+  struct GNUNET_NAMESTORE_ZoneIterator *tmp = it->h->z_head;
+
+  while (tmp != NULL)
+  {
+    if (tmp == it)
+      break;
+    tmp = tmp->next;
+  }
+  GNUNET_assert (NULL != tmp);
 
   /* set msg_size*/
   msg_size = sizeof (struct ZoneIterationStopMessage);