aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-09-05 03:36:22 +0000
committerBart Polot <bart@net.in.tum.de>2013-09-05 03:36:22 +0000
commit729672a9ed4f6946fb867da17beef945f4b15b63 (patch)
tree85757c7b89b485cbe58c3a1956f2af59f8d7eed8
parent3a682d79308224dbb6ea46300f5ca1766eac9422 (diff)
downloadgnunet-729672a9ed4f6946fb867da17beef945f4b15b63.tar.gz
gnunet-729672a9ed4f6946fb867da17beef945f4b15b63.zip
- use queue, not ack, for buffer size calculation
-rw-r--r--src/mesh/gnunet-service-mesh-enc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesh/gnunet-service-mesh-enc.c b/src/mesh/gnunet-service-mesh-enc.c
index d1a8970f8..06de8f70c 100644
--- a/src/mesh/gnunet-service-mesh-enc.c
+++ b/src/mesh/gnunet-service-mesh-enc.c
@@ -1719,6 +1719,11 @@ connection_get_buffer (struct MeshConnection *c, int fwd)
1719 1719
1720/** 1720/**
1721 * Get the total buffer space for a tunnel. 1721 * Get the total buffer space for a tunnel.
1722 *
1723 * @param t Tunnel.
1724 * @param fwd Is this for FWD traffic?
1725 *
1726 * @return Buffer space offered by all connections in the tunnel.
1722 */ 1727 */
1723static unsigned int 1728static unsigned int
1724tunnel_get_buffer (struct MeshTunnel2 *t, int fwd) 1729tunnel_get_buffer (struct MeshTunnel2 *t, int fwd)
@@ -1764,7 +1769,7 @@ tunnel_get_buffer (struct MeshTunnel2 *t, int fwd)
1764 } 1769 }
1765 1770
1766 fc = fwd ? &c->fwd_fc : &c->bck_fc; 1771 fc = fwd ? &c->fwd_fc : &c->bck_fc;
1767 buffer += fc->last_ack_recv - fc->last_pid_sent; 1772 buffer += fc->queue_max - fc->queue_n;
1768 c = c->next; 1773 c = c->next;
1769 } 1774 }
1770 1775