gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r27977 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r27977 - gnunet/src/mesh
Date: Sat, 13 Jul 2013 04:29:18 +0200

Author: bartpolot
Date: 2013-07-13 04:29:18 +0200 (Sat, 13 Jul 2013)
New Revision: 27977

Modified:
   gnunet/src/mesh/gnunet-service-mesh.c
Log:
- fixes

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2013-07-13 02:06:51 UTC (rev 
27976)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2013-07-13 02:29:18 UTC (rev 
27977)
@@ -2155,6 +2155,8 @@
   delta = t->queue_max - t->next_fc.queue_n;
   if (0 > delta)
     delta = 0;
+  if (NULL != t->owner && delta > 1)
+    delta = 1;
   ack = t->prev_fc.last_pid_recv + delta;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " FWD ACK %u\n", ack);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -2344,7 +2346,7 @@
   /* Search the message to be retransmitted in the outgoing queue */
   payload = (struct GNUNET_MESH_Data *) &copy[1];
   hop = rel == t->fwd_rel ? t->next_hop : t->prev_hop;
-  fc = rel == t->fwd_rel ? &t->next_fc : &t->prev_fc;
+  fc = rel == t->fwd_rel ? &t->prev_fc : &t->next_fc;
   pi = peer_get_short (hop);
   for (q = pi->queue_head; NULL != q; q = q->next)
   {
@@ -3733,8 +3735,8 @@
     GNUNET_STATISTICS_update (stats, "# unsolicited unicast", 1, GNUNET_NO);
     GNUNET_break_op (0);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Received PID %u, ACK %u\n",
-                pid, t->prev_fc.last_ack_sent);
+                "Received PID %u, (prev %u), ACK %u\n",
+                pid, t->prev_fc.last_pid_recv, t->prev_fc.last_ack_sent);
     tunnel_send_fwd_ack(t, GNUNET_MESSAGE_TYPE_MESH_POLL);
     return GNUNET_OK;
   }
@@ -3766,6 +3768,7 @@
                   " Pid %u not expected (%u), dropping!\n",
                   pid, t->prev_fc.last_pid_recv + 1);
     }
+    tunnel_send_fwd_ack (t, GNUNET_MESSAGE_TYPE_MESH_UNICAST);
     return GNUNET_OK;
   }
   t->prev_fc.last_pid_recv = pid;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]