diff options
Diffstat (limited to 'src/mesh/gnunet-service-mesh.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 9f988a17e..0739e0d7d 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -850,11 +850,7 @@ send_subscribed_clients (const struct GNUNET_MessageHeader *msg, | |||
850 | GNUNET_break (0); | 850 | GNUNET_break (0); |
851 | return 0; | 851 | return 0; |
852 | } | 852 | } |
853 | // FIXME proper client differentiation mechanism required | 853 | |
854 | if (htons (msg->type) == GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN) | ||
855 | *tid = htonl (t->local_tid); | ||
856 | else | ||
857 | *tid = htonl (t->local_tid_dest != 0 ? t->local_tid_dest : t->local_tid); | ||
858 | for (count = 0, c = clients; c != NULL; c = c->next) | 854 | for (count = 0, c = clients; c != NULL; c = c->next) |
859 | { | 855 | { |
860 | #if MESH_DEBUG | 856 | #if MESH_DEBUG |
@@ -862,6 +858,18 @@ send_subscribed_clients (const struct GNUNET_MessageHeader *msg, | |||
862 | #endif | 858 | #endif |
863 | if (client_is_subscribed (type, c)) | 859 | if (client_is_subscribed (type, c)) |
864 | { | 860 | { |
861 | // FIXME proper client differentiation mechanism required | ||
862 | if (htons (msg->type) == GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN) | ||
863 | *tid = htonl (t->local_tid); | ||
864 | else if(c == t->client) | ||
865 | *tid = htonl (t->local_tid); | ||
866 | else if(c == t->client_dest) | ||
867 | *tid = htonl (t->local_tid_dest); | ||
868 | else | ||
869 | { | ||
870 | GNUNET_break (0); | ||
871 | continue; | ||
872 | } | ||
865 | count++; | 873 | count++; |
866 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: sending\n"); | 874 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: sending\n"); |
867 | GNUNET_SERVER_notification_context_unicast (nc, c->handle, | 875 | GNUNET_SERVER_notification_context_unicast (nc, c->handle, |