diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-05 11:23:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-05 11:23:06 +0000 |
commit | 3066c800a6d6b6e16d6c174519025608b6f7f250 (patch) | |
tree | f6b216578bf89c7474b40c7566c267dabcdc2f0d /src/namestore/gnunet-service-namestore.c | |
parent | e097895ea54b316c3ede8640f6dd49f864313a2d (diff) | |
download | gnunet-3066c800a6d6b6e16d6c174519025608b6f7f250.tar.gz gnunet-3066c800a6d6b6e16d6c174519025608b6f7f250.zip |
-allow passing NULL for zone to iterate over all of our zones
Diffstat (limited to 'src/namestore/gnunet-service-namestore.c')
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 194ceaa04..a1ce120d8 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -862,7 +862,7 @@ enum ZoneIterationResult | |||
862 | 862 | ||
863 | /** | 863 | /** |
864 | * Context for record remove operations passed from | 864 | * Context for record remove operations passed from |
865 | * 'run_zone_iteration_round' to 'zone_iteraterate_proc' as closure | 865 | * #run_zone_iteration_round to #zone_iteraterate_proc as closure |
866 | */ | 866 | */ |
867 | struct ZoneIterationProcResult | 867 | struct ZoneIterationProcResult |
868 | { | 868 | { |
@@ -934,6 +934,7 @@ zone_iteraterate_proc (void *cls, | |||
934 | static void | 934 | static void |
935 | run_zone_iteration_round (struct ZoneIteration *zi) | 935 | run_zone_iteration_round (struct ZoneIteration *zi) |
936 | { | 936 | { |
937 | static struct GNUNET_CRYPTO_EccPrivateKey zero; | ||
937 | struct ZoneIterationProcResult proc; | 938 | struct ZoneIterationProcResult proc; |
938 | struct RecordResultMessage rrm; | 939 | struct RecordResultMessage rrm; |
939 | int ret; | 940 | int ret; |
@@ -945,7 +946,9 @@ run_zone_iteration_round (struct ZoneIteration *zi) | |||
945 | { | 946 | { |
946 | if (GNUNET_SYSERR == | 947 | if (GNUNET_SYSERR == |
947 | (ret = GSN_database->iterate_records (GSN_database->cls, | 948 | (ret = GSN_database->iterate_records (GSN_database->cls, |
948 | &zi->zone, | 949 | (0 == memcmp (&zi->zone, &zero, sizeof (zero))) |
950 | ? NULL | ||
951 | : &zi->zone, | ||
949 | zi->offset, | 952 | zi->offset, |
950 | &zone_iteraterate_proc, &proc))) | 953 | &zone_iteraterate_proc, &proc))) |
951 | { | 954 | { |
@@ -982,7 +985,7 @@ run_zone_iteration_round (struct ZoneIteration *zi) | |||
982 | * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START message | 985 | * Handles a #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START message |
983 | * | 986 | * |
984 | * @param cls unused | 987 | * @param cls unused |
985 | * @param client GNUNET_SERVER_Client sending the message | 988 | * @param client the client sending the message |
986 | * @param message message of type 'struct ZoneIterationStartMessage' | 989 | * @param message message of type 'struct ZoneIterationStartMessage' |
987 | */ | 990 | */ |
988 | static void | 991 | static void |