From f815a16a9f505893ed948c775992a86fa8e5cbc0 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Thu, 15 Mar 2012 13:47:51 +0000 Subject: [PATCH] - fixes --- src/namestore/gnunet-service-namestore.c | 6 +++--- src/namestore/namestore_api.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index dc81ccea3..bfdae2603 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c @@ -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); } diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 85f14cdcf..ddf3742db 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c @@ -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); -- 2.25.1