gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r22944 - gnunet/src/mesh
Date: Fri, 27 Jul 2012 15:07:19 +0200

Author: bartpolot
Date: 2012-07-27 15:07:19 +0200 (Fri, 27 Jul 2012)
New Revision: 22944

Modified:
   gnunet/src/mesh/gnunet-service-mesh.c
Log:
- dont send duplicate acks, allow null client

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2012-07-27 12:55:52 UTC (rev 
22943)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2012-07-27 13:07:19 UTC (rev 
22944)
@@ -1943,12 +1943,19 @@
   struct GNUNET_MESH_LocalAck msg;
   uint32_t ack;
 
+  if (NULL == c)
+    return;
+
   ack = tunnel_get_ack (t);
 
+  if (t->last_ack == ack)
+    return;
+
+  t->last_ack = ack;
   msg.header.size = htons (sizeof (msg));
   msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_ACK);
   msg.tunnel_id = htonl (t->local_tid);
-  msg.max_pid = ack;
+  msg.max_pid = htonl (ack);
 
   GNUNET_SERVER_notification_context_unicast (nc, c->handle,
                                               &msg.header, GNUNET_NO);




reply via email to

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