gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r31215 - gnunet/src/mesh
Date: Mon, 9 Dec 2013 14:55:59 +0100

Author: bartpolot
Date: 2013-12-09 14:55:59 +0100 (Mon, 09 Dec 2013)
New Revision: 31215

Modified:
   gnunet/src/mesh/gnunet-service-mesh_channel.c
Log:
- don't flag as ERROR if channel is loopback (no retransmissions necessary in 
that case)


Modified: gnunet/src/mesh/gnunet-service-mesh_channel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_channel.c       2013-12-09 13:51:16 UTC 
(rev 31214)
+++ gnunet/src/mesh/gnunet-service-mesh_channel.c       2013-12-09 13:55:59 UTC 
(rev 31215)
@@ -339,6 +339,23 @@
 
 
 /**
+ * Test if the channel is loopback: both root and dest are on the local peer.
+ *
+ * @param ch Channel to test.
+ *
+ * @return #GNUNET_YES if channel is loopback, #GNUNET_NO otherwise.
+ */
+static int
+is_loopback (const struct MeshChannel *ch)
+{
+  if (NULL != ch->t)
+    return GMT_is_loopback (ch->t);
+
+  return (NULL != ch->root && NULL != ch->dest);
+}
+
+
+/**
  * We have received a message out of order, or the client is not ready.
  * Buffer it until we receive an ACK from the client or the missing
  * message from the channel.
@@ -386,6 +403,7 @@
     LOG (GNUNET_ERROR_TYPE_DEBUG, "add_buffered_data END\n");
 }
 
+
 /**
  * Add a destination client to a channel, initializing all data structures
  * in the channel and the client.
@@ -1104,8 +1122,11 @@
   }
   else
   {
-    /* We SHOULD have been trying to retransmit this! */
-    GNUNET_break (oldstate == MESH_CHANNEL_READY);
+    if (GNUNET_NO == is_loopback (ch))
+    {
+      /* We SHOULD have been trying to retransmit this! */
+      GNUNET_break (oldstate == MESH_CHANNEL_READY);
+    }
   }
 
   /* In case of a FWD ACK (SYNACK) send a BCK ACK (ACK). */
@@ -1188,23 +1209,6 @@
 
 
 /**
- * Test if the channel is loopback: both root and dest are on the local peer.
- *
- * @param ch Channel to test.
- *
- * @return #GNUNET_YES if channel is loopback, #GNUNET_NO otherwise.
- */
-static int
-is_loopback (const struct MeshChannel *ch)
-{
-  if (NULL != ch->t)
-    return GMT_is_loopback (ch->t);
-
-  return (NULL != ch->root && NULL != ch->dest);
-}
-
-
-/**
  * Handle a loopback message: call the appropriate handler for the message 
type.
  *
  * @param ch Channel this message is on.




reply via email to

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