From: Christian Grothoff Date: Fri, 24 Feb 2017 13:16:27 +0000 (+0100) Subject: not always ready when send_kx is called X-Git-Tag: taler-0.2.1~70^2~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d9998446e75bdeb535dc78a58dbc8b7f5a962dd3;p=oweals%2Fgnunet.git not always ready when send_kx is called --- 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; }