aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-06-25 11:27:32 +0000
committerBart Polot <bart@net.in.tum.de>2013-06-25 11:27:32 +0000
commit9774078813f0cca5b98a1b3d4c558e2bef4ae512 (patch)
tree68d73430553ba45748303fc05f1c7d9620978a06 /src
parent6cf9b48f7188916564c1a66b072b392dbd65c9e1 (diff)
- fix unicast/to_origin oversimplification
Diffstat (limited to 'src')
-rw-r--r--src/mesh/mesh2_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesh/mesh2_api.c b/src/mesh/mesh2_api.c
index d9e02c40ed..2245b03f40 100644
--- a/src/mesh/mesh2_api.c
+++ b/src/mesh/mesh2_api.c
@@ -1218,7 +1218,6 @@ send_callback (void *cls, size_t size, void *buf)
psize += sizeof (dmsg);
GNUNET_assert (size >= psize);
dmsg.header.size = htons (psize);
- dmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN);
dmsg.tid = htonl (t->tid);
dmsg.pid = htonl (t->last_pid_sent + 1);
dmsg.ttl = 0;
@@ -1229,11 +1228,13 @@ send_callback (void *cls, size_t size, void *buf)
if (t->tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV)
{
/* traffic to origin */
+ dmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN);
LOG (GNUNET_ERROR_TYPE_DEBUG, "# to origin, type %s\n",
GNUNET_MESH_DEBUG_M2S (ntohs (mh->type)));
}
else
{
+ dmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_UNICAST);
LOG (GNUNET_ERROR_TYPE_DEBUG, "# unicast, type %s\n",
GNUNET_MESH_DEBUG_M2S (ntohs (mh->type)));
}