From d9998446e75bdeb535dc78a58dbc8b7f5a962dd3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 24 Feb 2017 14:16:27 +0100 Subject: [PATCH] not always ready when send_kx is called --- src/cadet/gnunet-service-cadet-new_tunnels.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c b/src/cadet/gnunet-service-cadet-new_tunnels.c index 9d87f9e03..bf05fae6b 100644 --- a/src/cadet/gnunet-service-cadet-new_tunnels.c +++ b/src/cadet/gnunet-service-cadet-new_tunnels.c @@ -1319,7 +1319,8 @@ send_kx (struct CadetTunnel *t, struct GNUNET_CADET_TunnelKeyExchangeMessage *msg; enum GNUNET_CADET_KX_Flags flags; - if (NULL == ct) + if ( (NULL == ct) || + (GNUNET_NO == ct->is_ready) ) ct = get_ready_connection (t); if (NULL == ct) { @@ -1829,7 +1830,7 @@ GCT_handle_kx_auth (struct CadetTConnection *ct, 1, GNUNET_NO); send_kx (t, - NULL, + ct, &t->ax); return; } -- 2.25.1