also do send_kx if we fail to decrypt
authorChristian Grothoff <christian@grothoff.org>
Mon, 20 Feb 2017 22:23:58 +0000 (23:23 +0100)
committerChristian Grothoff <christian@grothoff.org>
Mon, 20 Feb 2017 22:24:21 +0000 (23:24 +0100)
src/cadet/gnunet-service-cadet-new_tunnels.c

index f4772a16c89f45e7a17b44306e16337fd389ef47..ed3a3a36215df27a27bdc48bcc357aa3b5814fc2 100644 (file)
@@ -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;
   }