diff options
author | Bart Polot <bart@net.in.tum.de> | 2012-10-17 16:31:57 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2012-10-17 16:31:57 +0000 |
commit | 41cbe7c2e8064a07e7e9652452a5bb482929761f (patch) | |
tree | c37590a360b2976f120f6a125a7bca202b50a389 /src/mesh | |
parent | 0fe140180c1b1b5c55f36652275f4168a5e2e85c (diff) | |
download | gnunet-41cbe7c2e8064a07e7e9652452a5bb482929761f.tar.gz gnunet-41cbe7c2e8064a07e7e9652452a5bb482929761f.zip |
- fix counter used for bck ACKs, style
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 842c5e7e1..2b410fd96 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -3997,11 +3997,15 @@ tunnel_send_child_bck_ack (void *cls, | |||
3997 | GNUNET_PEER_resolve (id, &peer); | 3997 | GNUNET_PEER_resolve (id, &peer); |
3998 | cinfo = tunnel_get_neighbor_fc (t, &peer); | 3998 | cinfo = tunnel_get_neighbor_fc (t, &peer); |
3999 | 3999 | ||
4000 | if (cinfo->bck_ack != cinfo->fwd_pid && | 4000 | if (cinfo->bck_ack != cinfo->bck_pid && |
4001 | GNUNET_NO == GMC_is_pid_bigger (cinfo->bck_ack, cinfo->fwd_pid)) | 4001 | GNUNET_NO == GMC_is_pid_bigger (cinfo->bck_ack, cinfo->bck_pid)) |
4002 | { | ||
4003 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
4004 | " Not sending ACK, not needed\n"); | ||
4002 | return; | 4005 | return; |
4006 | } | ||
4003 | 4007 | ||
4004 | cinfo->bck_ack++; // FIXME window size? | 4008 | cinfo->bck_ack++; // FIXME fc window size? |
4005 | send_ack (t, &peer, cinfo->bck_ack); | 4009 | send_ack (t, &peer, cinfo->bck_ack); |
4006 | } | 4010 | } |
4007 | 4011 | ||
@@ -5104,7 +5108,8 @@ queue_add (void *cls, uint16_t type, size_t size, | |||
5104 | n = &t->bck_queue_n; | 5108 | n = &t->bck_queue_n; |
5105 | max = &t->bck_queue_max; | 5109 | max = &t->bck_queue_max; |
5106 | } | 5110 | } |
5107 | if (NULL != n) { | 5111 | if (NULL != n) |
5112 | { | ||
5108 | if (*n >= *max) | 5113 | if (*n >= *max) |
5109 | { | 5114 | { |
5110 | struct MeshTransmissionDescriptor *td = cls; | 5115 | struct MeshTransmissionDescriptor *td = cls; |