From 8c33a0e02cd9e42c3aca834eafe5a39e0ebc82d1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 20 Feb 2017 23:23:58 +0100 Subject: [PATCH] also do send_kx if we fail to decrypt --- src/cadet/gnunet-service-cadet-new_tunnels.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c b/src/cadet/gnunet-service-cadet-new_tunnels.c index f4772a16c..ed3a3a362 100644 --- a/src/cadet/gnunet-service-cadet-new_tunnels.c +++ b/src/cadet/gnunet-service-cadet-new_tunnels.c @@ -3135,14 +3135,21 @@ GCT_handle_encrypted (struct CadetTConnection *ct, if (-1 == decrypted_size) { /* Decryption failed for good, complain. */ - GNUNET_break_op (0); LOG (GNUNET_ERROR_TYPE_WARNING, - "%s failed to decrypt and validate encrypted data\n", + "%s failed to decrypt and validate encrypted data, retrying KX\n", GCT_2s (t)); GNUNET_STATISTICS_update (stats, "# unable to decrypt", 1, GNUNET_NO); + if (NULL != t->kx_task) + { + GNUNET_SCHEDULER_cancel (t->kx_task); + t->kx_task = NULL; + } + send_kx (t, + ct, + &t->ax); return; } -- 2.25.1