From 376fdb6f928985925ba826dfb163e5dd2eb8bc05 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 7 Nov 2013 18:23:33 +0000 Subject: [PATCH] - account for out-of-order kx messages --- src/mesh/gnunet-service-mesh_connection.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 50349df45..d529934eb 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c @@ -1528,6 +1528,17 @@ 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_state (c->t)) + GMT_change_state (c->t, MESH_TUNNEL3_READY); + } + + /* Is this message for us? */ if (GMC_is_terminal (c, fwd)) { LOG (GNUNET_ERROR_TYPE_DEBUG, " message for us!\n"); -- 2.25.1