simplify logic
authorChristian Grothoff <christian@grothoff.org>
Thu, 10 May 2018 09:26:50 +0000 (11:26 +0200)
committerChristian Grothoff <christian@grothoff.org>
Thu, 10 May 2018 09:26:50 +0000 (11:26 +0200)
src/zonemaster/gnunet-service-zonemaster-monitor.c
src/zonemaster/gnunet-service-zonemaster.c

index a0c178511b7328f38f5d6920d44a5faef065c397..46feb117f12eefb844104e1bba912df2c10b922c 100644 (file)
@@ -235,8 +235,7 @@ convert_records_for_export (const struct GNUNET_GNSRECORD_Data *rd,
  * @param label label to store under
  * @param rd_public public record data
  * @param rd_public_count number of records in @a rd_public
- * @param cont function to call with PUT result
- * @param cont_cls closure for @a cont
+ * @param ma handle for the PUT operation
  * @return DHT PUT handle, NULL on error
  */
 static struct GNUNET_DHT_PutHandle *
@@ -244,8 +243,7 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
                  const char *label,
                  const struct GNUNET_GNSRECORD_Data *rd_public,
                  unsigned int rd_public_count,
-                 GNUNET_SCHEDULER_TaskCallback cont,
-                 void *cont_cls)
+                 struct DhtPutActivity *ma)
 {
   struct GNUNET_GNSRECORD_Block *block;
   struct GNUNET_HashCode query;
@@ -296,8 +294,8 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
                         block_size,
                         block,
                         expire,
-                        cont,
-                        cont_cls);
+                        &dht_put_monitor_continuation,
+                        ma);
   GNUNET_free (block);
   return ret;
 }
@@ -350,7 +348,6 @@ handle_monitor_event (void *cls,
                             label,
                             rd,
                             rd_count,
-                            &dht_put_monitor_continuation,
                             ma);
   if (NULL == ma->ph)
   {
index 482d3a2034a375a654b45c8e9a088a92303f565a..719a84107cb3160a2bf5b4e5ff9ad4b94b192011 100644 (file)
@@ -578,8 +578,7 @@ convert_records_for_export (const struct GNUNET_GNSRECORD_Data *rd,
  * @param label label to store under
  * @param rd_public public record data
  * @param rd_public_count number of records in @a rd_public
- * @param cont function to call with PUT result
- * @param cont_cls closure for @a cont
+ * @param ma handle for the put operation
  * @return DHT PUT handle, NULL on error
  */
 static struct GNUNET_DHT_PutHandle *
@@ -587,8 +586,7 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
                  const char *label,
                  const struct GNUNET_GNSRECORD_Data *rd_public,
                  unsigned int rd_public_count,
-                 GNUNET_SCHEDULER_TaskCallback cont,
-                 void *cont_cls)
+                 struct DhtPutActivity *ma)
 {
   struct GNUNET_GNSRECORD_Block *block;
   struct GNUNET_HashCode query;
@@ -640,8 +638,8 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
                         block_size,
                         block,
                         expire,
-                        cont,
-                        cont_cls);
+                        &dht_put_continuation,
+                        ma);
   GNUNET_free (block);
   return ret;
 }
@@ -759,7 +757,6 @@ put_gns_record (void *cls,
                             label,
                             rd_public,
                             rd_public_count,
-                            &dht_put_continuation,
                             ma);
   put_cnt++;
   if (0 == put_cnt % DELTA_INTERVAL)