gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r28115 - gnunet/src/mesh
Date: Wed, 17 Jul 2013 14:54:59 +0200

Author: bartpolot
Date: 2013-07-17 14:54:59 +0200 (Wed, 17 Jul 2013)
New Revision: 28115

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

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2013-07-17 12:46:04 UTC (rev 
28114)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2013-07-17 12:54:59 UTC (rev 
28115)
@@ -4334,26 +4334,20 @@
   }
 
   /* Is this a forward or backward ACK? */
-  id = GNUNET_PEER_search(peer);
+  id = GNUNET_PEER_search (peer);
   pid = ntohl (msg->pid);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  PID %u\n", pid);
   if (t->next_hop == id)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  from FWD\n");
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  was %u\n", 
t->next_fc.last_pid_recv);
     fc = &t->next_fc;
     old = fc->last_pid_recv;
-    fc->last_pid_recv = pid;
-    tunnel_send_ack (t, GNUNET_MESSAGE_TYPE_MESH_POLL, GNUNET_NO);
   }
   else if (t->prev_hop == id)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  from BCK\n");
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  was %u\n", 
t->prev_fc.last_pid_recv);
     fc = &t->prev_fc;
     old = fc->last_pid_recv;
-    fc->last_pid_recv = pid;
-    tunnel_send_ack (t, GNUNET_MESSAGE_TYPE_MESH_POLL, GNUNET_YES);
   }
   else
   {
@@ -4361,6 +4355,10 @@
     return GNUNET_OK;
   }
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  was %u\n", fc->last_pid_recv);
+  fc->last_pid_recv = pid;
+  tunnel_send_ack (t, GNUNET_MESSAGE_TYPE_MESH_POLL, t->prev_hop == id);
+
   if (GNUNET_YES == t->reliable)
     fc->last_pid_recv = old;
 




reply via email to

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