aboutsummaryrefslogtreecommitdiff
path: root/src/cadet
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-27 22:27:31 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-27 22:27:31 +0100
commit58beb5ec4ca0dae1e9adc8617c9d69e5b558b9cc (patch)
treec68287623cc064a576470c13264cf844451651f1 /src/cadet
parentb9ea024cbe97dc152624a9c18717246cda49c25f (diff)
downloadgnunet-58beb5ec4ca0dae1e9adc8617c9d69e5b558b9cc.tar.gz
gnunet-58beb5ec4ca0dae1e9adc8617c9d69e5b558b9cc.zip
also count messages dropped due to slow clients as allowable losses in unreliable mode
Diffstat (limited to 'src/cadet')
-rw-r--r--src/cadet/gnunet-service-cadet-new_channel.c7
-rw-r--r--src/cadet/test_cadet.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c
index ebc566c83..8633e7f74 100644
--- a/src/cadet/gnunet-service-cadet-new_channel.c
+++ b/src/cadet/gnunet-service-cadet-new_channel.c
@@ -1242,6 +1242,13 @@ GCCH_handle_channel_plaintext_data (struct CadetChannel *ch,
1242 1242
1243 /* Yep, need to drop. Drop the oldest message in 1243 /* Yep, need to drop. Drop the oldest message in
1244 the buffer. */ 1244 the buffer. */
1245 LOG (GNUNET_ERROR_TYPE_DEBUG,
1246 "Queue full due slow client on %s, dropping oldest message\n",
1247 GCCH_2s (ch));
1248 GNUNET_STATISTICS_update (stats,
1249 "# messages dropped due to slow client",
1250 1,
1251 GNUNET_NO);
1245 drop = ccc->head_recv; 1252 drop = ccc->head_recv;
1246 GNUNET_CONTAINER_DLL_remove (ccc->head_recv, 1253 GNUNET_CONTAINER_DLL_remove (ccc->head_recv,
1247 ccc->tail_recv, 1254 ccc->tail_recv,
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c
index 79d9423fd..9957d9021 100644
--- a/src/cadet/test_cadet.c
+++ b/src/cadet/test_cadet.c
@@ -395,7 +395,8 @@ stats_iterator (void *cls,
395{ 395{
396 static const char *s_sent = "# keepalives sent"; 396 static const char *s_sent = "# keepalives sent";
397 static const char *s_recv = "# keepalives received"; 397 static const char *s_recv = "# keepalives received";
398 static const char *drops = "# messages dropped due to full buffer"; 398 static const char *rdrops = "# messages dropped due to full buffer";
399 static const char *cdrops = "# messages dropped due to slow client";
399 uint32_t i; 400 uint32_t i;
400 401
401 i = GNUNET_TESTBED_get_index (peer); 402 i = GNUNET_TESTBED_get_index (peer);
@@ -409,7 +410,9 @@ stats_iterator (void *cls,
409 ka_sent = value; 410 ka_sent = value;
410 if (0 == strncmp(s_recv, name, strlen (s_recv)) && peers_requested - 1 == i) 411 if (0 == strncmp(s_recv, name, strlen (s_recv)) && peers_requested - 1 == i)
411 ka_received = value; 412 ka_received = value;
412 if (0 == strncmp(drops, name, strlen (drops))) 413 if (0 == strncmp(rdrops, name, strlen (rdrops)))
414 msg_dropped += value;
415 if (0 == strncmp(cdrops, name, strlen (cdrops)))
413 msg_dropped += value; 416 msg_dropped += value;
414 417
415 return GNUNET_OK; 418 return GNUNET_OK;