aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-13 20:08:11 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-13 20:08:11 +0000
commit7ee0e1af2fb61d09bdc646fbdbaa0a698330a478 (patch)
tree6bde5814c1ff6de6969b58bf347327485bc277c9 /src/dht
parenta4473b58bdd25d7e3531cbc50086e75ae62b769b (diff)
downloadgnunet-7ee0e1af2fb61d09bdc646fbdbaa0a698330a478.tar.gz
gnunet-7ee0e1af2fb61d09bdc646fbdbaa0a698330a478.zip
-doxygen, one more statistic
Diffstat (limited to 'src/dht')
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c6
-rw-r--r--src/dht/gnunet-service-xdht_neighbours.c16
2 files changed, 17 insertions, 5 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index cc1e97bfd..38a9c45ad 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -24,7 +24,6 @@
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 * @author Nathan Evans 25 * @author Nathan Evans
26 */ 26 */
27
28#include "platform.h" 27#include "platform.h"
29#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
30#include "gnunet_block_lib.h" 29#include "gnunet_block_lib.h"
@@ -789,6 +788,11 @@ core_transmit_notify (void *cls, size_t size, void *buf)
789 while ((NULL != (pending = peer->head)) && 788 while ((NULL != (pending = peer->head)) &&
790 (0 == GNUNET_TIME_absolute_get_remaining (pending->timeout).rel_value_us)) 789 (0 == GNUNET_TIME_absolute_get_remaining (pending->timeout).rel_value_us))
791 { 790 {
791 GNUNET_STATISTICS_update (GDS_stats,
792 gettext_noop
793 ("# Messages dropped (CORE timeout)"),
794 1,
795 GNUNET_NO);
792 peer->pending_count--; 796 peer->pending_count--;
793 GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending); 797 GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending);
794 GNUNET_free (pending); 798 GNUNET_free (pending);
diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c
index 50fed309b..3ad86e941 100644
--- a/src/dht/gnunet-service-xdht_neighbours.c
+++ b/src/dht/gnunet-service-xdht_neighbours.c
@@ -979,11 +979,18 @@ core_transmit_notify (void *cls, size_t size, void *buf)
979 size_t msize; 979 size_t msize;
980 980
981 peer->th = NULL; 981 peer->th = NULL;
982 while ((NULL != (pending = peer->head)) && 982 while ( (NULL != (pending = peer->head)) &&
983 (0 == GNUNET_TIME_absolute_get_remaining (pending->timeout).rel_value_us)) 983 (0 == GNUNET_TIME_absolute_get_remaining (pending->timeout).rel_value_us) )
984 { 984 {
985 GNUNET_STATISTICS_update (GDS_stats,
986 gettext_noop
987 ("# Messages dropped (CORE timeout)"),
988 1,
989 GNUNET_NO);
985 peer->pending_count--; 990 peer->pending_count--;
986 GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending); 991 GNUNET_CONTAINER_DLL_remove (peer->head,
992 peer->tail,
993 pending);
987 GNUNET_free (pending); 994 GNUNET_free (pending);
988 } 995 }
989 if (NULL == pending) 996 if (NULL == pending)
@@ -1009,7 +1016,8 @@ core_transmit_notify (void *cls, size_t size, void *buf)
1009 { 1016 {
1010 GNUNET_STATISTICS_update (GDS_stats, 1017 GNUNET_STATISTICS_update (GDS_stats,
1011 gettext_noop 1018 gettext_noop
1012 ("# Bytes transmitted to other peers"), msize, 1019 ("# Bytes transmitted to other peers"),
1020 msize,
1013 GNUNET_NO); 1021 GNUNET_NO);
1014 memcpy (&cbuf[off], pending->msg, msize); 1022 memcpy (&cbuf[off], pending->msg, msize);
1015 off += msize; 1023 off += msize;