From 69b47f0c65a68e8731af238246b1b29121117d7c Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 28 Nov 2013 01:28:41 +0000 Subject: - send conncetion ack before kex exchange -> cleaner state maintenance --- src/mesh/gnunet-service-mesh_connection.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 417bda417..10fcb7b11 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c @@ -1391,13 +1391,14 @@ GMC_handle_confirm (void *cls, const struct GNUNET_PeerIdentity *peer, if (MESH_CONNECTION_SENT == oldstate) connection_reset_timeout (c, GNUNET_YES); - /* Change connection and tunnel state */ + /* Change connection state */ connection_change_state (c, MESH_CONNECTION_READY); + send_connection_ack (c, GNUNET_YES); + + /* Change tunnel state, trigger KX */ if (MESH_TUNNEL3_WAITING == GMT_get_cstate (c->t)) GMT_change_cstate (c->t, MESH_TUNNEL3_READY); - /* Send ACK (~TCP ACK)*/ - send_connection_ack (c, GNUNET_YES); return GNUNET_OK; } -- cgit v1.2.3