aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-31 17:45:25 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-31 17:45:25 +0100
commit24dc41dd58c67b53829888c21bbcaffc7cab5a05 (patch)
tree01ec4f405e1b5ec9b88be9fbee2b3c2dd27af91d
parent0782694edb983228127c3ce521a9bec0c6b4ec41 (diff)
downloadgnunet-24dc41dd58c67b53829888c21bbcaffc7cab5a05.tar.gz
gnunet-24dc41dd58c67b53829888c21bbcaffc7cab5a05.zip
implement no-buffer option at route level
-rw-r--r--src/cadet/gnunet-service-cadet-new_core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_core.c b/src/cadet/gnunet-service-cadet-new_core.c
index 70d0cb83e..ee05a2442 100644
--- a/src/cadet/gnunet-service-cadet-new_core.c
+++ b/src/cadet/gnunet-service-cadet-new_core.c
@@ -27,7 +27,6 @@
27 * All functions in this file should use the prefix GCO (Gnunet Cadet cOre (bottom)) 27 * All functions in this file should use the prefix GCO (Gnunet Cadet cOre (bottom))
28 * 28 *
29 * TODO: 29 * TODO:
30 * - do NOT use buffering if the route options say no buffer!
31 * - Optimization: given BROKEN messages, destroy paths (?) 30 * - Optimization: given BROKEN messages, destroy paths (?)
32 */ 31 */
33#include "platform.h" 32#include "platform.h"
@@ -394,6 +393,12 @@ route_message (struct CadetPeer *prev,
394 GNUNET_MQ_msg_copy (msg)); 393 GNUNET_MQ_msg_copy (msg));
395 return; 394 return;
396 } 395 }
396 /* Check if buffering is disallowed, and if so, make sure we only queue
397 one message per direction. */
398 if ( (0 != (route->options & GNUNET_CADET_OPTION_NOBUFFER)) &&
399 (NULL != dir->env_head) )
400 discard_buffer (dir,
401 dir->env_head);
397 rung = dir->rung; 402 rung = dir->rung;
398 if (cur_buffers == max_buffers) 403 if (cur_buffers == max_buffers)
399 { 404 {