diff options
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index f96146ec2..747726fd0 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -674,6 +674,35 @@ static void handle_iteration_next (void *cls, | |||
674 | const struct GNUNET_MessageHeader * message) | 674 | const struct GNUNET_MessageHeader * message) |
675 | { | 675 | { |
676 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "ZONE_ITERATION_NEXT"); | 676 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n", "ZONE_ITERATION_NEXT"); |
677 | |||
678 | struct GNUNET_NAMESTORE_Client *nc; | ||
679 | struct GNUNET_NAMESTORE_ZoneIteration *zi; | ||
680 | struct ZoneIterationStopMessage * zis_msg = (struct ZoneIterationStopMessage *) message; | ||
681 | uint32_t id; | ||
682 | |||
683 | nc = client_lookup(client); | ||
684 | if (nc == NULL) | ||
685 | { | ||
686 | GNUNET_break_op (0); | ||
687 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | ||
688 | return; | ||
689 | } | ||
690 | |||
691 | id = ntohl (zis_msg->op_id); | ||
692 | for (zi = nc->op_head; zi != NULL; zi = zi->next) | ||
693 | { | ||
694 | if (zi->op_id == id) | ||
695 | break; | ||
696 | } | ||
697 | if (zi == NULL) | ||
698 | { | ||
699 | GNUNET_break_op (0); | ||
700 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | ||
701 | return; | ||
702 | } | ||
703 | |||
704 | zi->offset++; | ||
705 | res = GSN_database->iterate_records (GSN_database->cls, &zis_msg->zone, NULL, zi->offset , &zone_iteration_proc, zi); | ||
677 | } | 706 | } |
678 | 707 | ||
679 | 708 | ||