[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23169 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23169 - gnunet/src/mesh |
Date: |
Wed, 8 Aug 2012 21:05:27 +0200 |
Author: bartpolot
Date: 2012-08-08 21:05:27 +0200 (Wed, 08 Aug 2012)
New Revision: 23169
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
- wip
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2012-08-08 18:55:24 UTC (rev
23168)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2012-08-08 19:05:27 UTC (rev
23169)
@@ -498,11 +498,16 @@
struct MeshTunnelClientInfo
{
/**
- * Last sent PID.
+ * PID of the last packet sent to the client (FWD).
*/
- uint32_t pid;
+ uint32_t fwd_pid;
/**
+ * PID of the last packet received from the client (BCK).
+ */
+ uint32_t bck_pid;
+
+ /**
* Maximum PID allowed (FWD ACK received).
*/
uint32_t fwd_ack;
@@ -3213,10 +3218,10 @@
struct MeshTunnelClientInfo clinfo;
GNUNET_array_append (t->clients, t->nclients, c);
+ clinfo.fwd_ack = t->fwd_pid + 1;
+ clinfo.bck_ack = t->nobuffer ? 1 : INITIAL_WINDOW_SIZE;
+ clinfo.fwd_pid = t->fwd_pid;
t->nclients--;
- clinfo.fwd_ack = t->fwd_pid + 1;
- clinfo.bck_ack = t->bck_ack + 1; // FIXME fc review
- clinfo.pid = t->fwd_pid;
GNUNET_array_append (t->clients_fc, t->nclients, clinfo);
}
@@ -3533,7 +3538,7 @@
*
* @return ACK value.
*/
-static uint32_t
+uint32_t // FIXME fc Is this funcion needed anymore?
tunnel_get_client_fwd_ack (struct MeshTunnel *t,
struct MeshClient *c)
{
@@ -3789,7 +3794,7 @@
/**
* @brief Send BCK ACKs to clients to allow them more to_origin traffic
*
- * Iterates over all clients and sends BCK ACKs to the ones that need
+ * Iterates over all clients and sends BCK ACKs to the ones that need it.
*
* @param t Tunnel on which to send the BCK ACKs.
*/
@@ -3805,14 +3810,14 @@
unsigned int delta;
clinfo = &t->clients_fc[i];
- delta = clinfo->bck_ack - clinfo->pid;
+ delta = clinfo->bck_ack - clinfo->bck_pid;
if ((GNUNET_NO == t->nobuffer && ACK_THRESHOLD > delta) ||
(GNUNET_YES == t->nobuffer && 0 == delta))
{
uint32_t ack;
- ack = clinfo->pid;
+ ack = clinfo->bck_pid;
ack += t->nobuffer ? 1 : INITIAL_WINDOW_SIZE;
send_local_ack(t->clients[i], t, ack);
clinfo->bck_ack = ack;
@@ -6875,7 +6880,7 @@
}
/* It should be sent by someone who has this as incoming tunnel. */
- if (-1 == client_knows_tunnel (c, t))
+ if (GNUNET_NO == client_knows_tunnel (c, t))
{
GNUNET_break (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23169 - gnunet/src/mesh,
gnunet <=