From 7d0c18e4ff5cb21baa7ba3d0dc917e4d18047512 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Wed, 15 Jul 2015 11:45:13 +0000 Subject: [PATCH] - send payload on AX key receive --- src/cadet/gnunet-service-cadet_tunnel.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c index aad80af0b..8fa13dffd 100644 --- a/src/cadet/gnunet-service-cadet_tunnel.c +++ b/src/cadet/gnunet-service-cadet_tunnel.c @@ -624,10 +624,15 @@ static int is_ready (struct CadetTunnel *t) { int ready; - - ready = CADET_TUNNEL_READY == t->cstate - && (CADET_TUNNEL_KEY_OK == t->estate - || CADET_TUNNEL_KEY_REKEY == t->estate); + int conn_ok; + int enc_ok; + + conn_ok = CADET_TUNNEL_READY == t->cstate; + enc_ok = CADET_TUNNEL_KEY_OK == t->estate + || CADET_TUNNEL_KEY_REKEY == t->estate + || (CADET_TUNNEL_KEY_PING == t->estate + && CADET_Axolotl == t->enc_type); + ready = conn_ok && enc_ok; ready = ready || GCT_is_loopback (t); return ready; } @@ -2977,6 +2982,8 @@ handle_kx_ax (struct CadetTunnel *t, const struct GNUNET_CADET_AX_KX *msg) ax->ratchet_expiration = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get(), ratchet_time); } + GCT_change_estate (t, CADET_TUNNEL_KEY_PING); + send_queued_data (t); } -- 2.25.1