aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-12-15 07:18:03 +0000
committerBart Polot <bart@net.in.tum.de>2014-12-15 07:18:03 +0000
commit8f9b85786d6c1dca1b5a9b03c64c5366db597df7 (patch)
tree35f1f34de070fc387a2a52d59e208571558c232a /src
parent1f39de8b391b77e1da35cfcad3db0ad40e506d80 (diff)
downloadgnunet-8f9b85786d6c1dca1b5a9b03c64c5366db597df7.tar.gz
gnunet-8f9b85786d6c1dca1b5a9b03c64c5366db597df7.zip
- send queued data the first time
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_tunnel.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c
index 14d8b1d11..554b1d1b9 100644
--- a/src/cadet/gnunet-service-cadet_tunnel.c
+++ b/src/cadet/gnunet-service-cadet_tunnel.c
@@ -2234,22 +2234,24 @@ GCT_change_cstate (struct CadetTunnel* t, enum CadetTunnelCState cstate)
2234void 2234void
2235GCT_change_estate (struct CadetTunnel* t, enum CadetTunnelEState state) 2235GCT_change_estate (struct CadetTunnel* t, enum CadetTunnelEState state)
2236{ 2236{
2237 enum CadetTunnelEState old;
2238
2237 if (NULL == t) 2239 if (NULL == t)
2238 return; 2240 return;
2239 2241
2242 old = t->estate;
2243 t->estate = state;
2240 LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s estate was %s\n", 2244 LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s estate was %s\n",
2241 GCP_2s (t->peer), estate2s (t->estate)); 2245 GCP_2s (t->peer), estate2s (old));
2242 LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s estate is now %s\n", 2246 LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s estate is now %s\n",
2243 GCP_2s (t->peer), estate2s (state)); 2247 GCP_2s (t->peer), estate2s (t->estate));
2244 2248
2245 /* Send queued data if enc state changes to OK */ 2249 /* Send queued data if enc state changes to OK */
2246 if (myid != GCP_get_short_id (t->peer) && 2250 if (myid != GCP_get_short_id (t->peer) &&
2247 CADET_TUNNEL_KEY_OK != t->estate && CADET_TUNNEL_KEY_OK == state) 2251 CADET_TUNNEL_KEY_OK != old && CADET_TUNNEL_KEY_OK == t->estate)
2248 { 2252 {
2249 send_queued_data (t); 2253 send_queued_data (t);
2250 } 2254 }
2251
2252 t->estate = state;
2253} 2255}
2254 2256
2255 2257