[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19272 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19272 - gnunet/src/mesh |
Date: |
Thu, 19 Jan 2012 23:39:41 +0100 |
Author: bartpolot
Date: 2012-01-19 23:39:41 +0100 (Thu, 19 Jan 2012)
New Revision: 19272
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
Fixed #2087, wrong local tunnel number sent when multiple clients are
subscribed to one type message on same peer and one clientis owner of the
tunnel and the other is target
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2012-01-19 22:13:40 UTC (rev
19271)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2012-01-19 22:39:41 UTC (rev
19272)
@@ -850,11 +850,7 @@
GNUNET_break (0);
return 0;
}
- // FIXME proper client differentiation mechanism required
- if (htons (msg->type) == GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN)
- *tid = htonl (t->local_tid);
- else
- *tid = htonl (t->local_tid_dest != 0 ? t->local_tid_dest : t->local_tid);
+
for (count = 0, c = clients; c != NULL; c = c->next)
{
#if MESH_DEBUG
@@ -862,6 +858,18 @@
#endif
if (client_is_subscribed (type, c))
{
+ // FIXME proper client differentiation mechanism required
+ if (htons (msg->type) == GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN)
+ *tid = htonl (t->local_tid);
+ else if(c == t->client)
+ *tid = htonl (t->local_tid);
+ else if(c == t->client_dest)
+ *tid = htonl (t->local_tid_dest);
+ else
+ {
+ GNUNET_break (0);
+ continue;
+ }
count++;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: sending\n");
GNUNET_SERVER_notification_context_unicast (nc, c->handle,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19272 - gnunet/src/mesh,
gnunet <=