gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r36151 - gnunet/src/cadet


From: gnunet
Subject: [GNUnet-SVN] r36151 - gnunet/src/cadet
Date: Fri, 31 Jul 2015 08:58:58 +0200

Author: bartpolot
Date: 2015-07-31 08:58:58 +0200 (Fri, 31 Jul 2015)
New Revision: 36151

Modified:
   gnunet/src/cadet/gnunet-service-cadet_tunnel.c
Log:
- only change from uninitialized to sent, to avoid having the tunnel as not 
ready on re-key

Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2015-07-31 06:58:57 UTC 
(rev 36150)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2015-07-31 06:58:58 UTC 
(rev 36151)
@@ -2905,12 +2905,13 @@
     return;
   }
 
-  if (GNUNET_CADET_AX_KX_FLAG_FORCE_REPLY ==
-      (GNUNET_CADET_AX_KX_FLAG_FORCE_REPLY & ntohl (msg->flags)))
+  if (0 != (GNUNET_CADET_AX_KX_FLAG_FORCE_REPLY & ntohl (msg->flags)))
     GCT_send_ax_kx (t, GNUNET_NO);
 
-  if (0 == memcmp(&ax->DHRr, &msg->ratchet_key, sizeof(msg->ratchet_key)))
+  if (0 == memcmp (&ax->DHRr, &msg->ratchet_key, sizeof(msg->ratchet_key)))
+  {
     return;
+  }
 
   LOG (GNUNET_ERROR_TYPE_INFO, " is Alice? %s\n", am_I_alice ? "YES" : "NO");
 
@@ -4301,7 +4302,7 @@
   GNUNET_CRYPTO_ecdhe_key_get_public (t->ax->DHRs, &msg.ratchet_key);
 
   t->ephm_h = send_kx (t, &msg.header);
-  if (CADET_TUNNEL_KEY_OK != t->estate)
+  if (CADET_TUNNEL_KEY_UNINITIALIZED == t->estate)
     GCT_change_estate (t, CADET_TUNNEL_KEY_SENT);
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]