From 7b1f04400778be78d0494803e926474ffba25cc7 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Wed, 27 Nov 2013 16:08:09 +0000 Subject: [PATCH] - remove old dead code / message types --- src/include/gnunet_protocols.h | 55 ++++------------------------ src/mesh/gnunet-service-mesh_local.c | 4 +- src/mesh/gnunet-service-mesh_peer.c | 2 - src/mesh/mesh_api.c | 2 +- 4 files changed, 10 insertions(+), 53 deletions(-) diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 3169e2318..2853ee1a3 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -784,21 +784,18 @@ extern "C" #define GNUNET_MESSAGE_TYPE_MESH_HELLO 216 /** - * Request the creation of a connection DEPRECATED + * Request the creation of a connection */ -#define GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE 256 #define GNUNET_MESSAGE_TYPE_MESH_CONNECTION_CREATE 256 /** - * Send origin an ACK that the connection is complete DEPRECATED + * Send origin an ACK that the connection is complete */ -#define GNUNET_MESSAGE_TYPE_MESH_PATH_ACK 257 #define GNUNET_MESSAGE_TYPE_MESH_CONNECTION_ACK 257 /** - * Notify that a connection is no longer valid DEPRECATED + * Notify that a connection is no longer valid */ -#define GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN 258 #define GNUNET_MESSAGE_TYPE_MESH_CONNECTION_BROKEN 258 /** @@ -837,36 +834,10 @@ extern "C" #define GNUNET_MESSAGE_TYPE_MESH_KX_PONG 265 /** - * Payload data origin->end DEPRECATED. + * Request the destuction of a connection */ -#define GNUNET_MESSAGE_TYPE_MESH_UNICAST 260 - -/** - * Payload data end->origin DEPRECATED. - */ -#define GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN 262 - -/** - * Confirm owner->dest data end-to-end (ack goes dest->owner). DEPRECATED - */ -#define GNUNET_MESSAGE_TYPE_MESH_UNICAST_ACK 263 - -/** - * Confirm dest->owner data end-to-end (ack goes owner->dest). DEPRECATED - */ -#define GNUNET_MESSAGE_TYPE_MESH_TO_ORIG_ACK 264 - -/** - * Request the destuction of a path (PATH DEPRECATED) - */ -#define GNUNET_MESSAGE_TYPE_MESH_PATH_DESTROY 266 #define GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY 266 -/** - * Request the destruction of a whole tunnel - */ -#define GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY 267 - /** * Hop-by-hop, connection dependent ACK. */ @@ -878,7 +849,7 @@ extern "C" #define GNUNET_MESSAGE_TYPE_MESH_POLL 269 /** - * Announce origin is still alive. + * Announce origin is still alive. DEPRECATED */ #define GNUNET_MESSAGE_TYPE_MESH_FWD_KEEPALIVE 270 #define GNUNET_MESSAGE_TYPE_MESH_KEEPALIVE 270 @@ -894,16 +865,14 @@ extern "C" #define GNUNET_MESSAGE_TYPE_MESH_LOCAL_CONNECT 272 /** - * Ask the mesh service to create a new tunnel DEPRECATED + * Ask the mesh service to create a new channel. */ #define GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE 273 -#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE 273 /** - * Ask the mesh service to destroy a tunnel DEPRECATED + * Ask the mesh service to destroy a channel. */ #define GNUNET_MESSAGE_TYPE_MESH_CHANNEL_DESTROY 274 -#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY 274 /** * Confirm the creation of a channel @@ -915,21 +884,11 @@ extern "C" */ #define GNUNET_MESSAGE_TYPE_MESH_CHANNEL_NACK 276 -/** - * Encrypted data going forward. DEPRECATED - */ -#define GNUNET_MESSAGE_TYPE_MESH_FWD 280 - /** * Encrypted data. (Payload, channel management, keepalive) */ #define GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED 280 -/** - * Encrypted data going backwards. - */ -#define GNUNET_MESSAGE_TYPE_MESH_BCK 281 - /** * Payload client <-> service */ diff --git a/src/mesh/gnunet-service-mesh_local.c b/src/mesh/gnunet-service-mesh_local.c index 099a55e26..8b66517d0 100644 --- a/src/mesh/gnunet-service-mesh_local.c +++ b/src/mesh/gnunet-service-mesh_local.c @@ -1008,7 +1008,7 @@ GML_send_channel_create (struct MeshClient *c, struct GNUNET_MESH_ChannelMessage msg; msg.header.size = htons (sizeof (msg)); - msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE); + msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE); msg.channel_id = htonl (id); msg.port = htonl (port); msg.opt = htonl (opt); @@ -1037,7 +1037,7 @@ GML_send_channel_destroy (struct MeshClient *c, uint32_t id) if (GNUNET_YES == c->shutting_down) return; msg.header.size = htons (sizeof (msg)); - msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY); + msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_CHANNEL_DESTROY); msg.channel_id = htonl (id); msg.port = htonl (0); memset (&msg.peer, 0, sizeof (msg.peer)); diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c index 967bd1712..f18dcbb76 100644 --- a/src/mesh/gnunet-service-mesh_peer.c +++ b/src/mesh/gnunet-service-mesh_peer.c @@ -808,7 +808,6 @@ queue_send (void *cls, size_t size, void *buf) /* Fill buf */ switch (queue->type) { - case GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY: case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY: case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_BROKEN: case GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED: @@ -922,7 +921,6 @@ GMP_queue_destroy (struct MeshPeerQueue *queue, int clear_cls) switch (queue->type) { case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY: - case GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY: LOG (GNUNET_ERROR_TYPE_INFO, "destroying a DESTROY message\n"); /* fall through */ case GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED: diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index c202ed231..c9df698fb 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -1062,7 +1062,7 @@ msg_received (void *cls, const struct GNUNET_MessageHeader *msg) process_channel_created (h, (struct GNUNET_MESH_ChannelMessage *) msg); break; /* Notify of a channel disconnection */ - case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_DESTROY: + case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_DESTROY: /* TODO separate(gid problem)*/ case GNUNET_MESSAGE_TYPE_MESH_LOCAL_NACK: process_channel_destroy (h, (struct GNUNET_MESH_ChannelMessage *) msg); break; -- 2.25.1