From e809642b8dc11b4ace915a5c98147b43918b8bd0 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 7 Nov 2013 18:01:51 +0000 Subject: [PATCH] - move connection set code to connection.c --- src/mesh/gnunet-service-mesh_connection.c | 6 ++++++ src/mesh/gnunet-service-mesh_tunnel.c | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 3dd765a63..50349df45 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c @@ -2225,6 +2225,7 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, switch (type) { struct GNUNET_MESH_Encrypted *emsg; + struct GNUNET_MESH_KX *kmsg; struct GNUNET_MESH_ACK *amsg; struct GNUNET_MESH_Poll *pmsg; struct GNUNET_MESH_ConnectionDestroy *dmsg; @@ -2253,6 +2254,11 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, } break; + case GNUNET_MESSAGE_TYPE_MESH_KX: + kmsg = (struct GNUNET_MESH_KX *) data; + kmsg->cid = c->id; + break; + case GNUNET_MESSAGE_TYPE_MESH_ACK: amsg = (struct GNUNET_MESH_ACK *) data; amsg->cid = c->id; diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c index 9815d1977..42a03d304 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.c +++ b/src/mesh/gnunet-service-mesh_tunnel.c @@ -650,7 +650,6 @@ send_kx (struct MeshTunnel3 *t, case GNUNET_MESSAGE_TYPE_MESH_KX_EPHEMERAL: case GNUNET_MESSAGE_TYPE_MESH_KX_PING: case GNUNET_MESSAGE_TYPE_MESH_KX_PONG: - msg->cid = *GMC_get_id (c); msg->reserved = htonl (0); memcpy (&msg[1], message, size); break; -- 2.25.1