[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34571 - gnunet/src/cadet
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34571 - gnunet/src/cadet |
Date: |
Mon, 15 Dec 2014 08:17:29 +0100 |
Author: bartpolot
Date: 2014-12-15 08:17:29 +0100 (Mon, 15 Dec 2014)
New Revision: 34571
Modified:
gnunet/src/cadet/gnunet-service-cadet_tunnel.c
Log:
- refactor enc_state changer
Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c 2014-12-15 07:17:27 UTC
(rev 34570)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c 2014-12-15 07:17:29 UTC
(rev 34571)
@@ -2267,10 +2267,11 @@
}
}
+
/**
* Change the tunnel encryption state.
*
- * @param t Tunnel whose encryption state to change.
+ * @param t Tunnel whose encryption state to change, or NULL.
* @param state New encryption state.
*/
void
@@ -2278,20 +2279,20 @@
{
if (NULL == t)
return;
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Tunnel %s estate was %s\n",
+
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s estate was %s\n",
GCP_2s (t->peer), estate2s (t->estate));
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Tunnel %s estate is now %s\n",
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s estate is now %s\n",
GCP_2s (t->peer), estate2s (state));
+
+ t->estate = state;
+
+ /* Send queued data if enc state changes to OK */
if (myid != GCP_get_short_id (t->peer) &&
CADET_TUNNEL_KEY_OK != t->estate && CADET_TUNNEL_KEY_OK == state)
{
- t->estate = state;
send_queued_data (t);
- return;
}
- t->estate = state;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34571 - gnunet/src/cadet,
gnunet <=