projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
671e24b
)
- dont send duplicate acks, allow null client
author
Bart Polot
<bart@net.in.tum.de>
Fri, 27 Jul 2012 13:07:19 +0000
(13:07 +0000)
committer
Bart Polot
<bart@net.in.tum.de>
Fri, 27 Jul 2012 13:07:19 +0000
(13:07 +0000)
src/mesh/gnunet-service-mesh.c
patch
|
blob
|
history
diff --git
a/src/mesh/gnunet-service-mesh.c
b/src/mesh/gnunet-service-mesh.c
index 114dc8d6a084694f02599c93d9cd62ae944a4ba5..858b87bbd160f64bab51d7c653876ea3381387d7 100644
(file)
--- a/
src/mesh/gnunet-service-mesh.c
+++ b/
src/mesh/gnunet-service-mesh.c
@@
-1943,12
+1943,19
@@
send_client_tunnel_ack (struct MeshClient *c, struct MeshTunnel *t)
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);