From: Christian Grothoff Date: Tue, 13 Sep 2011 12:25:52 +0000 (+0000) Subject: stuff X-Git-Tag: initial-import-from-subversion-38251~17145 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e844e33e3f73cbb79e95d4728324e2474f1b9c04;p=oweals%2Fgnunet.git stuff --- diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index e815ee200..23192b86b 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c @@ -913,6 +913,7 @@ decrease_max_send_delay (struct GNUNET_TIME_Relative max_time) } } + /** * Find the maximum send time of the recently sent values. * @@ -940,24 +941,25 @@ get_max_send_delay () return max_time; } + static void increment_stats (const char *value) { - if (stats != NULL) - { - GNUNET_STATISTICS_update (stats, value, 1, GNUNET_NO); - } + if (stats == NULL) + return; + GNUNET_STATISTICS_update (stats, value, 1, GNUNET_NO); } + static void decrement_stats (const char *value) { - if (stats != NULL) - { - GNUNET_STATISTICS_update (stats, value, -1, GNUNET_NO); - } + if (stats == NULL) + return; + GNUNET_STATISTICS_update (stats, value, -1, GNUNET_NO); } + /** * Try to send another message from our core send list */ @@ -999,6 +1001,7 @@ try_core_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) } } + /** * Function called to send a request out to another peer. * Called both for locally initiated requests and those @@ -1218,6 +1221,7 @@ distance (const GNUNET_HashCode * target, const GNUNET_HashCode * have) return msb | lsb; } + /** * Return a number that is larger the closer the * "have" GNUNET_hash code is to the "target". @@ -2338,6 +2342,7 @@ handle_dht_get (const struct GNUNET_MessageHeader *msg, return results; } + static void remove_recent_find_peer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) @@ -2350,6 +2355,7 @@ remove_recent_find_peer (void *cls, GNUNET_free (key); } + /** * Server handler for initiating local dht find peer requests *