aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_dht.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cadet/gnunet-service-cadet_dht.c b/src/cadet/gnunet-service-cadet_dht.c
index 7307ba001..d6228110f 100644
--- a/src/cadet/gnunet-service-cadet_dht.c
+++ b/src/cadet/gnunet-service-cadet_dht.c
@@ -218,7 +218,6 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
218 return; 218 return;
219 } 219 }
220 LOG (GNUNET_ERROR_TYPE_DEBUG, "Announce ID\n"); 220 LOG (GNUNET_ERROR_TYPE_DEBUG, "Announce ID\n");
221
222 /* TODO 221 /* TODO
223 * - Set data expiration in function of X 222 * - Set data expiration in function of X
224 * - Adapt X to churn 223 * - Adapt X to churn
@@ -230,12 +229,17 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
230 announce_id_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, 229 announce_id_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
231 &announce_id, cls); 230 &announce_id, cls);
232 LOG (GNUNET_ERROR_TYPE_DEBUG, " no hello, waiting!\n"); 231 LOG (GNUNET_ERROR_TYPE_DEBUG, " no hello, waiting!\n");
232 GNUNET_STATISTICS_update (stats, "# DHT announce skipped (no hello)",
233 1, GNUNET_NO);
234
233 return; 235 return;
234 } 236 }
235 expiration = GNUNET_HELLO_get_last_expiration (hello); 237 expiration = GNUNET_HELLO_get_last_expiration (hello);
236 retry_time = GNUNET_TIME_absolute_get_remaining (expiration); 238 retry_time = GNUNET_TIME_absolute_get_remaining (expiration);
237 239
238 LOG (GNUNET_ERROR_TYPE_DEBUG, "Hello %p size: %u\n", hello, size); 240 LOG (GNUNET_ERROR_TYPE_DEBUG, "Hello %p size: %u\n", hello, size);
241 GNUNET_STATISTICS_update (stats, "# DHT announce",
242 1, GNUNET_NO);
239 memset (&phash, 0, sizeof (phash)); 243 memset (&phash, 0, sizeof (phash));
240 memcpy (&phash, &my_full_id, sizeof (my_full_id)); 244 memcpy (&phash, &my_full_id, sizeof (my_full_id));
241 GNUNET_DHT_put (dht_handle, /* DHT handle */ 245 GNUNET_DHT_put (dht_handle, /* DHT handle */
@@ -346,8 +350,9 @@ GCD_search (const struct GNUNET_PeerIdentity *peer_id,
346 struct GNUNET_HashCode phash; 350 struct GNUNET_HashCode phash;
347 struct GCD_search_handle *h; 351 struct GCD_search_handle *h;
348 352
349 LOG (GNUNET_ERROR_TYPE_DEBUG, 353 LOG (GNUNET_ERROR_TYPE_DEBUG, " Starting DHT GET for peer %s\n",
350 " Starting DHT GET for peer %s\n", GNUNET_i2s (peer_id)); 354 GNUNET_i2s (peer_id));
355 GNUNET_STATISTICS_update (stats, "# DHT search", 1, GNUNET_NO);
351 memset (&phash, 0, sizeof (phash)); 356 memset (&phash, 0, sizeof (phash));
352 memcpy (&phash, peer_id, sizeof (*peer_id)); 357 memcpy (&phash, peer_id, sizeof (*peer_id));
353 h = GNUNET_new (struct GCD_search_handle); 358 h = GNUNET_new (struct GCD_search_handle);