From 3e486c783a28012a08ffd61f639a1baefbaef5d7 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 21 Jan 2014 03:05:00 +0000 Subject: [PATCH] - dont start keepalive on intermediate peers --- src/mesh/gnunet-service-mesh_connection.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 5954941e6..3c6dcd45c 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c @@ -986,6 +986,8 @@ connection_bck_keepalive (void *cls, * Schedule next keepalive task, taking in consideration * the connection state and number of retries. * + * If the peer is not the origin, do nothing. + * * @param c Connection for which to schedule the next keepalive. * @param fwd Direction for the next keepalive. */ @@ -996,6 +998,9 @@ schedule_next_keepalive (struct MeshConnection *c, int fwd) GNUNET_SCHEDULER_TaskIdentifier *task_id; GNUNET_SCHEDULER_Task keepalive_task; + if (GNUNET_NO == GMC_is_origin (c, fwd)) + return; + /* Calculate delay to use, depending on the state of the connection */ if (MESH_CONNECTION_READY == c->state) { -- 2.25.1