aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-10-18 03:52:23 +0000
committerBart Polot <bart@net.in.tum.de>2013-10-18 03:52:23 +0000
commitb8a3c441ee68b8dbeae9106367507f661ea0a00a (patch)
treeaad9696a42804e035269aa3d643f8756b3aa3594 /src
parent33354bfe79f97acb2c98d08fa4f1c32f2d2b1220 (diff)
downloadgnunet-b8a3c441ee68b8dbeae9106367507f661ea0a00a.tar.gz
gnunet-b8a3c441ee68b8dbeae9106367507f661ea0a00a.zip
- fix flow control
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-mesh_connection.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c
index 64174f3f5..b1b251595 100644
--- a/src/mesh/gnunet-service-mesh_connection.c
+++ b/src/mesh/gnunet-service-mesh_connection.c
@@ -2178,7 +2178,7 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
2178 GNUNET_break (0); 2178 GNUNET_break (0);
2179 } 2179 }
2180 2180
2181 if (fc->queue_n >= fc->queue_max && droppable) 2181 if (fc->queue_n > fc->queue_max && droppable)
2182 { 2182 {
2183 GNUNET_STATISTICS_update (stats, "# messages dropped (buffer full)", 2183 GNUNET_STATISTICS_update (stats, "# messages dropped (buffer full)",
2184 1, GNUNET_NO); 2184 1, GNUNET_NO);
@@ -2186,6 +2186,8 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
2186 LOG (GNUNET_ERROR_TYPE_DEBUG, 2186 LOG (GNUNET_ERROR_TYPE_DEBUG,
2187 "queue full: %u/%u\n", 2187 "queue full: %u/%u\n",
2188 fc->queue_n, fc->queue_max); 2188 fc->queue_n, fc->queue_max);
2189 if (GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED == type)
2190 fc->queue_n--;
2189 return; /* Drop this message */ 2191 return; /* Drop this message */
2190 } 2192 }
2191 2193