aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/namestore_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/namestore_api.c')
-rw-r--r--src/namestore/namestore_api.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index da772cf82..fbf4711ae 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -93,6 +93,7 @@ struct GNUNET_NAMESTORE_ZoneIterator
93 GNUNET_HashCode zone; 93 GNUNET_HashCode zone;
94 uint32_t no_flags; 94 uint32_t no_flags;
95 uint32_t flags; 95 uint32_t flags;
96 int has_zone;
96}; 97};
97 98
98 99
@@ -1485,7 +1486,17 @@ GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h,
1485 it->proc = proc; 1486 it->proc = proc;
1486 it->proc_cls = proc; 1487 it->proc_cls = proc;
1487 it->op_id = rid; 1488 it->op_id = rid;
1488 it->zone = *zone; 1489
1490 if (NULL != zone)
1491 {
1492 it->zone = *zone;
1493 it->has_zone = GNUNET_YES;
1494 }
1495 else
1496 {
1497 memset (&it->zone, '\0', sizeof (it->zone));
1498 it->has_zone = GNUNET_NO;
1499 }
1489 GNUNET_CONTAINER_DLL_insert_tail(h->z_head, h->z_tail, it); 1500 GNUNET_CONTAINER_DLL_insert_tail(h->z_head, h->z_tail, it);
1490 1501
1491 /* set msg_size*/ 1502 /* set msg_size*/
@@ -1500,7 +1511,7 @@ GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h,
1500 msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START); 1511 msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START);
1501 msg->gns_header.header.size = htons (msg_size); 1512 msg->gns_header.header.size = htons (msg_size);
1502 msg->gns_header.r_id = htonl (rid); 1513 msg->gns_header.r_id = htonl (rid);
1503 if (NULL == zone) 1514 if (NULL != zone)
1504 msg->zone = *zone; 1515 msg->zone = *zone;
1505 else 1516 else
1506 memset (&msg->zone, '\0', sizeof (msg->zone)); 1517 memset (&msg->zone, '\0', sizeof (msg->zone));