gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r28629 - gnunet/src/mesh
Date: Wed, 14 Aug 2013 19:40:08 +0200

Author: bartpolot
Date: 2013-08-14 19:40:08 +0200 (Wed, 14 Aug 2013)
New Revision: 28629

Modified:
   gnunet/src/mesh/gnunet-service-mesh-enc.c
Log:
- avoid double pid increment


Modified: gnunet/src/mesh/gnunet-service-mesh-enc.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh-enc.c   2013-08-14 17:34:29 UTC (rev 
28628)
+++ gnunet/src/mesh/gnunet-service-mesh-enc.c   2013-08-14 17:40:08 UTC (rev 
28629)
@@ -1652,6 +1652,7 @@
     }
     msg->ttl = htonl (ttl - 1);
     msg->pid = htonl (fwd ? c->fwd_fc.next_pid++ : c->bck_fc.next_pid++);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " pid %u\n", ntohl (msg->pid));
   }
 
   queue_add (data,
@@ -1678,7 +1679,6 @@
                               int fwd)
 {
   struct MeshConnection *c;
-  struct MeshFlowControl *fc;
   uint16_t type;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Send on Tunnel %s\n",
@@ -1689,7 +1689,6 @@
     GNUNET_break (GNUNET_YES == t->destroy);
     return;
   }
-  fc = fwd ? &c->fwd_fc : &c->bck_fc;
   type = ntohs (msg->header.type);
   switch (type)
   {
@@ -1699,8 +1698,7 @@
     case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_DESTROY:
       msg->cid = htonl (c->id);
       msg->tid = t->id;
-      msg->ttl = default_ttl;
-      msg->pid = fc->next_pid++;
+      msg->ttl = htonl (default_ttl);
       break;
     default:
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "unkown type %s\n",




reply via email to

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