refactor DHT for new service API
[oweals/gnunet.git] / src / cadet / gnunet-service-cadet_dht.c
index 88a601b52e5a91a3cc0f00b2703dfaf71224e8ef..55dd10d33fed239465c13e24858e79b070ab41ec 100644 (file)
@@ -214,7 +214,6 @@ announce_id (void *cls)
   const struct GNUNET_HELLO_Message *hello;
   size_t size;
   struct GNUNET_TIME_Absolute expiration;
-  struct GNUNET_TIME_Relative retry_time;
 
   announce_id_task = NULL;
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Announce ID\n");
@@ -235,13 +234,12 @@ announce_id (void *cls)
     return;
   }
   expiration = GNUNET_HELLO_get_last_expiration (hello);
-  retry_time = GNUNET_TIME_absolute_get_remaining (expiration);
 
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Hello %p size: %u\n", hello, size);
   GNUNET_STATISTICS_update (stats, "# DHT announce",
                             1, GNUNET_NO);
   memset (&phash, 0, sizeof (phash));
-  memcpy (&phash, &my_full_id, sizeof (my_full_id));
+  GNUNET_memcpy (&phash, &my_full_id, sizeof (my_full_id));
   GNUNET_DHT_put (dht_handle,   /* DHT handle */
                   &phash,       /* Key to use */
                   dht_replication_level,     /* Replication level */
@@ -251,7 +249,6 @@ announce_id (void *cls)
                   size,  /* Size of the data */
                   (const char *) hello, /* Data itself */
                   expiration,  /* Data expiration */
-                  retry_time, /* Retry time */
                   NULL,         /* Continuation */
                   NULL);        /* Continuation closure */
   announce_id_task =
@@ -355,7 +352,7 @@ GCD_search (const struct GNUNET_PeerIdentity *peer_id,
        GNUNET_i2s (peer_id));
   GNUNET_STATISTICS_update (stats, "# DHT search", 1, GNUNET_NO);
   memset (&phash, 0, sizeof (phash));
-  memcpy (&phash, peer_id, sizeof (*peer_id));
+  GNUNET_memcpy (&phash, peer_id, sizeof (*peer_id));
   h = GNUNET_new (struct GCD_search_handle);
   h->peer_id = GNUNET_PEER_intern (peer_id);
   h->callback = callback;