diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-07-11 12:11:15 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-07-11 12:11:15 +0000 |
commit | 2874588334576b7fdce753ea97ab2956d5e8bf28 (patch) | |
tree | 5c3a80d58ad8822753990a4bac9823fa40fb3075 /src/mesh | |
parent | 494fb46a6401194dfb4d5267775125172d0c0441 (diff) | |
download | gnunet-2874588334576b7fdce753ea97ab2956d5e8bf28.tar.gz gnunet-2874588334576b7fdce753ea97ab2956d5e8bf28.zip |
- drop newest message when a retransmission comes in
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index d330fb42a..35650a5f8 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -3214,6 +3214,8 @@ queue_add (void *cls, uint16_t type, size_t size, | |||
3214 | if (queue->type == type && queue->tunnel == t) | 3214 | if (queue->type == type && queue->tunnel == t) |
3215 | { | 3215 | { |
3216 | pid_q = ntohl (((struct GNUNET_MESH_Data *)(queue->cls))->pid); | 3216 | pid_q = ntohl (((struct GNUNET_MESH_Data *)(queue->cls))->pid); |
3217 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
3218 | "pid: %u, pid_q: %u\n", pid, pid_q); | ||
3217 | break; | 3219 | break; |
3218 | } | 3220 | } |
3219 | GNUNET_assert (NULL != queue); | 3221 | GNUNET_assert (NULL != queue); |
@@ -3228,9 +3230,9 @@ queue_add (void *cls, uint16_t type, size_t size, | |||
3228 | if (queue->type == type && queue->tunnel == t) | 3230 | if (queue->type == type && queue->tunnel == t) |
3229 | { | 3231 | { |
3230 | /* Drop message from queue */ | 3232 | /* Drop message from queue */ |
3231 | GNUNET_CONTAINER_DLL_remove (dst->queue_head, | 3233 | pid_q = ntohl (((struct GNUNET_MESH_Data *)(queue->cls))->pid); |
3232 | dst->queue_tail, | 3234 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
3233 | queue); | 3235 | "dropping pid: %u\n", pid_q); |
3234 | queue_destroy (queue, GNUNET_YES); | 3236 | queue_destroy (queue, GNUNET_YES); |
3235 | fc->queue_n--; | 3237 | fc->queue_n--; |
3236 | t->pending_messages--; | 3238 | t->pending_messages--; |