diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-15 13:47:51 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-15 13:47:51 +0000 |
commit | f815a16a9f505893ed948c775992a86fa8e5cbc0 (patch) | |
tree | f7576f1639460d6467f1d1c06eec74a53e11739f | |
parent | 2cbe9bad404f440d986ca3efe86e1a0e97181297 (diff) | |
download | gnunet-f815a16a9f505893ed948c775992a86fa8e5cbc0.tar.gz gnunet-f815a16a9f505893ed948c775992a86fa8e5cbc0.zip |
- fixes
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 6 | ||||
-rw-r--r-- | 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 | |||
183 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); | 183 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); |
184 | GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd)); | 184 | GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd)); |
185 | 185 | ||
186 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 186 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
187 | _("Stored zonekey for zone `%s' in file `%s'\n"),GNUNET_h2s(&c->zone), c->filename); | 187 | _("Stored zonekey for zone `%s' in file `%s'\n"), GNUNET_h2s(&c->zone), c->filename); |
188 | return GNUNET_OK; | 188 | return GNUNET_OK; |
189 | } | 189 | } |
190 | 190 | ||
@@ -1470,7 +1470,7 @@ void zone_iteration_proc (void *cls, | |||
1470 | memcpy (name_tmp, name, name_len); | 1470 | memcpy (name_tmp, name, name_len); |
1471 | memcpy (rd_tmp, rd_ser, rd_ser_len); | 1471 | memcpy (rd_tmp, rd_ser, rd_ser_len); |
1472 | 1472 | ||
1473 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending empty `%s' message with size %u\n", "ZONE_ITERATION_RESPONSE", msg_size); | 1473 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message with size %u\n", "ZONE_ITERATION_RESPONSE", msg_size); |
1474 | GNUNET_SERVER_notification_context_unicast (snc, nc->client, (const struct GNUNET_MessageHeader *) zir_msg, GNUNET_NO); | 1474 | GNUNET_SERVER_notification_context_unicast (snc, nc->client, (const struct GNUNET_MessageHeader *) zir_msg, GNUNET_NO); |
1475 | GNUNET_free (zir_msg); | 1475 | GNUNET_free (zir_msg); |
1476 | } | 1476 | } |
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) | |||
1544 | 1544 | ||
1545 | GNUNET_assert (NULL != it); | 1545 | GNUNET_assert (NULL != it); |
1546 | h = it->h; | 1546 | h = it->h; |
1547 | struct GNUNET_NAMESTORE_ZoneIterator *tmp = it->h->z_head; | ||
1548 | |||
1549 | while (tmp != NULL) | ||
1550 | { | ||
1551 | if (tmp == it) | ||
1552 | break; | ||
1553 | tmp = tmp->next; | ||
1554 | } | ||
1555 | GNUNET_assert (NULL != tmp); | ||
1547 | 1556 | ||
1548 | /* set msg_size*/ | 1557 | /* set msg_size*/ |
1549 | msg_size = sizeof (struct ZoneIterationNextMessage); | 1558 | msg_size = sizeof (struct ZoneIterationNextMessage); |
@@ -1578,6 +1587,15 @@ GNUNET_NAMESTORE_zone_iteration_stop (struct GNUNET_NAMESTORE_ZoneIterator *it) | |||
1578 | struct PendingMessage *pe; | 1587 | struct PendingMessage *pe; |
1579 | size_t msg_size = 0; | 1588 | size_t msg_size = 0; |
1580 | struct GNUNET_NAMESTORE_Handle *h = it->h; | 1589 | struct GNUNET_NAMESTORE_Handle *h = it->h; |
1590 | struct GNUNET_NAMESTORE_ZoneIterator *tmp = it->h->z_head; | ||
1591 | |||
1592 | while (tmp != NULL) | ||
1593 | { | ||
1594 | if (tmp == it) | ||
1595 | break; | ||
1596 | tmp = tmp->next; | ||
1597 | } | ||
1598 | GNUNET_assert (NULL != tmp); | ||
1581 | 1599 | ||
1582 | /* set msg_size*/ | 1600 | /* set msg_size*/ |
1583 | msg_size = sizeof (struct ZoneIterationStopMessage); | 1601 | msg_size = sizeof (struct ZoneIterationStopMessage); |