diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-10 11:26:50 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-10 11:26:50 +0200 |
commit | f3e122bcb96dde2d406a6005013d96e67a045cd3 (patch) | |
tree | e4ebb57817d29458adf9bf6328e8561c38472baa /src/zonemaster | |
parent | 4fe4c850dec0aff53510de7fdd7fce5fa870ae40 (diff) | |
download | gnunet-f3e122bcb96dde2d406a6005013d96e67a045cd3.tar.gz gnunet-f3e122bcb96dde2d406a6005013d96e67a045cd3.zip |
simplify logic
Diffstat (limited to 'src/zonemaster')
-rw-r--r-- | src/zonemaster/gnunet-service-zonemaster-monitor.c | 11 | ||||
-rw-r--r-- | src/zonemaster/gnunet-service-zonemaster.c | 11 |
2 files changed, 8 insertions, 14 deletions
diff --git a/src/zonemaster/gnunet-service-zonemaster-monitor.c b/src/zonemaster/gnunet-service-zonemaster-monitor.c index a0c178511..46feb117f 100644 --- a/src/zonemaster/gnunet-service-zonemaster-monitor.c +++ b/src/zonemaster/gnunet-service-zonemaster-monitor.c | |||
@@ -235,8 +235,7 @@ convert_records_for_export (const struct GNUNET_GNSRECORD_Data *rd, | |||
235 | * @param label label to store under | 235 | * @param label label to store under |
236 | * @param rd_public public record data | 236 | * @param rd_public public record data |
237 | * @param rd_public_count number of records in @a rd_public | 237 | * @param rd_public_count number of records in @a rd_public |
238 | * @param cont function to call with PUT result | 238 | * @param ma handle for the PUT operation |
239 | * @param cont_cls closure for @a cont | ||
240 | * @return DHT PUT handle, NULL on error | 239 | * @return DHT PUT handle, NULL on error |
241 | */ | 240 | */ |
242 | static struct GNUNET_DHT_PutHandle * | 241 | static struct GNUNET_DHT_PutHandle * |
@@ -244,8 +243,7 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | |||
244 | const char *label, | 243 | const char *label, |
245 | const struct GNUNET_GNSRECORD_Data *rd_public, | 244 | const struct GNUNET_GNSRECORD_Data *rd_public, |
246 | unsigned int rd_public_count, | 245 | unsigned int rd_public_count, |
247 | GNUNET_SCHEDULER_TaskCallback cont, | 246 | struct DhtPutActivity *ma) |
248 | void *cont_cls) | ||
249 | { | 247 | { |
250 | struct GNUNET_GNSRECORD_Block *block; | 248 | struct GNUNET_GNSRECORD_Block *block; |
251 | struct GNUNET_HashCode query; | 249 | struct GNUNET_HashCode query; |
@@ -296,8 +294,8 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | |||
296 | block_size, | 294 | block_size, |
297 | block, | 295 | block, |
298 | expire, | 296 | expire, |
299 | cont, | 297 | &dht_put_monitor_continuation, |
300 | cont_cls); | 298 | ma); |
301 | GNUNET_free (block); | 299 | GNUNET_free (block); |
302 | return ret; | 300 | return ret; |
303 | } | 301 | } |
@@ -350,7 +348,6 @@ handle_monitor_event (void *cls, | |||
350 | label, | 348 | label, |
351 | rd, | 349 | rd, |
352 | rd_count, | 350 | rd_count, |
353 | &dht_put_monitor_continuation, | ||
354 | ma); | 351 | ma); |
355 | if (NULL == ma->ph) | 352 | if (NULL == ma->ph) |
356 | { | 353 | { |
diff --git a/src/zonemaster/gnunet-service-zonemaster.c b/src/zonemaster/gnunet-service-zonemaster.c index 482d3a203..719a84107 100644 --- a/src/zonemaster/gnunet-service-zonemaster.c +++ b/src/zonemaster/gnunet-service-zonemaster.c | |||
@@ -578,8 +578,7 @@ convert_records_for_export (const struct GNUNET_GNSRECORD_Data *rd, | |||
578 | * @param label label to store under | 578 | * @param label label to store under |
579 | * @param rd_public public record data | 579 | * @param rd_public public record data |
580 | * @param rd_public_count number of records in @a rd_public | 580 | * @param rd_public_count number of records in @a rd_public |
581 | * @param cont function to call with PUT result | 581 | * @param ma handle for the put operation |
582 | * @param cont_cls closure for @a cont | ||
583 | * @return DHT PUT handle, NULL on error | 582 | * @return DHT PUT handle, NULL on error |
584 | */ | 583 | */ |
585 | static struct GNUNET_DHT_PutHandle * | 584 | static struct GNUNET_DHT_PutHandle * |
@@ -587,8 +586,7 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | |||
587 | const char *label, | 586 | const char *label, |
588 | const struct GNUNET_GNSRECORD_Data *rd_public, | 587 | const struct GNUNET_GNSRECORD_Data *rd_public, |
589 | unsigned int rd_public_count, | 588 | unsigned int rd_public_count, |
590 | GNUNET_SCHEDULER_TaskCallback cont, | 589 | struct DhtPutActivity *ma) |
591 | void *cont_cls) | ||
592 | { | 590 | { |
593 | struct GNUNET_GNSRECORD_Block *block; | 591 | struct GNUNET_GNSRECORD_Block *block; |
594 | struct GNUNET_HashCode query; | 592 | struct GNUNET_HashCode query; |
@@ -640,8 +638,8 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | |||
640 | block_size, | 638 | block_size, |
641 | block, | 639 | block, |
642 | expire, | 640 | expire, |
643 | cont, | 641 | &dht_put_continuation, |
644 | cont_cls); | 642 | ma); |
645 | GNUNET_free (block); | 643 | GNUNET_free (block); |
646 | return ret; | 644 | return ret; |
647 | } | 645 | } |
@@ -759,7 +757,6 @@ put_gns_record (void *cls, | |||
759 | label, | 757 | label, |
760 | rd_public, | 758 | rd_public, |
761 | rd_public_count, | 759 | rd_public_count, |
762 | &dht_put_continuation, | ||
763 | ma); | 760 | ma); |
764 | put_cnt++; | 761 | put_cnt++; |
765 | if (0 == put_cnt % DELTA_INTERVAL) | 762 | if (0 == put_cnt % DELTA_INTERVAL) |