From 014c3c3501d023cbb6a897cd95ad17a321a82e50 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 16 Dec 2013 17:27:34 +0000 Subject: [PATCH] - only treat KX as confirmation if connection is not in destroy state --- src/mesh/gnunet-service-mesh_connection.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 2e9fae123..12b6f74af 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c @@ -1788,13 +1788,15 @@ handle_mesh_kx (const struct GNUNET_PeerIdentity *peer, /* Count as connection confirmation. */ if (MESH_CONNECTION_SENT == c->state || MESH_CONNECTION_ACK == c->state) - connection_change_state (c, MESH_CONNECTION_READY); - connection_reset_timeout (c, fwd); - if (NULL != c->t) { - if (MESH_TUNNEL3_WAITING == GMT_get_cstate (c->t)) - GMT_change_cstate (c->t, MESH_TUNNEL3_READY); + connection_change_state (c, MESH_CONNECTION_READY); + if (NULL != c->t) + { + if (MESH_TUNNEL3_WAITING == GMT_get_cstate (c->t)) + GMT_change_cstate (c->t, MESH_TUNNEL3_READY); + } } + connection_reset_timeout (c, fwd); /* Is this message for us? */ if (GMC_is_terminal (c, fwd)) -- 2.25.1