From b85bde32b7786ea6d162904cf28dd15c18504d72 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 18 Oct 2011 15:40:57 +0000 Subject: [PATCH] Change keepalive packets to explicit message type number --- src/include/gnunet_protocols.h | 5 +++++ src/mesh/gnunet-service-mesh.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index d61192710..d65a91911 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -824,6 +824,11 @@ extern "C" */ #define GNUNET_MESSAGE_TYPE_MESH_PATH_ACK 263 +/** + * Avoid path timeouts + */ +#define GNUNET_MESSAGE_TYPE_MESH_PATH_KEEPALIVE 264 + /** * We need flow control */ diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 8ee55c845..486684507 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -2182,9 +2182,9 @@ send_p2p_tunnel_destroy (void *cls, size_t size, void *buf) * @param message message * @param peer peer identity this notification is about * @param atsi performance data + * * @return GNUNET_OK to keep the connection open, * GNUNET_SYSERR to close it (signal serious error) - * */ static int handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, @@ -2772,7 +2772,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) msg->tid = htonl(t->id.tid); payload = (struct GNUNET_MessageHeader *) &msg[1]; payload->size = htons (sizeof(struct GNUNET_MessageHeader)); - payload->type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE); + payload->type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_KEEPALIVE); tunnel_send_multicast (t, &msg->header); t->path_refresh_task = -- 2.25.1