aboutsummaryrefslogtreecommitdiff
path: root/src/cadet
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-07-21 00:15:24 +0000
committerBart Polot <bart@net.in.tum.de>2014-07-21 00:15:24 +0000
commitc71f4ec2f893ace0fb9ce7c6b98d799bb79bd30e (patch)
treeb1035312038d88f9fe3eb092cf9dc44a573b9378 /src/cadet
parent2c0aed48a0c9507ea50b1683b7dc1cced822713d (diff)
downloadgnunet-c71f4ec2f893ace0fb9ce7c6b98d799bb79bd30e.tar.gz
gnunet-c71f4ec2f893ace0fb9ce7c6b98d799bb79bd30e.zip
- On a new EPHM, do a immediate rekey
Diffstat (limited to 'src/cadet')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c2
-rw-r--r--src/cadet/gnunet-service-cadet_tunnel.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index 5425e258a..d46a0a399 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -1841,7 +1841,7 @@ GCC_handle_broken (void* cls,
1841 * is popped! Do not use 'c' after the call. */ 1841 * is popped! Do not use 'c' after the call. */
1842 while (NULL != (out_msg = GCP_connection_pop (neighbor, c, &del))) 1842 while (NULL != (out_msg = GCP_connection_pop (neighbor, c, &del)))
1843 { 1843 {
1844 pending -= del + 1; 1844 pending -= del + 1; /* Substract the deleted messages + the popped one */
1845 GCT_resend_message (out_msg, t); 1845 GCT_resend_message (out_msg, t);
1846 } 1846 }
1847 /* All pending messages should have been popped, 1847 /* All pending messages should have been popped,
diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c
index fffdb9102..2d8aa90b6 100644
--- a/src/cadet/gnunet-service-cadet_tunnel.c
+++ b/src/cadet/gnunet-service-cadet_tunnel.c
@@ -1838,8 +1838,9 @@ handle_ephemeral (struct CadetTunnel *t,
1838 { 1838 {
1839 t->estate = CADET_TUNNEL_KEY_REKEY; 1839 t->estate = CADET_TUNNEL_KEY_REKEY;
1840 } 1840 }
1841 if (GNUNET_SCHEDULER_NO_TASK == t->rekey_task) 1841 if (GNUNET_SCHEDULER_NO_TASK != t->rekey_task)
1842 t->rekey_task = GNUNET_SCHEDULER_add_now (rekey_tunnel, t); 1842 GNUNET_SCHEDULER_cancel (t->rekey_task);
1843 t->rekey_task = GNUNET_SCHEDULER_add_now (rekey_tunnel, t);
1843 } 1844 }
1844 else if (CADET_TUNNEL_KEY_OK == t->estate) 1845 else if (CADET_TUNNEL_KEY_OK == t->estate)
1845 { 1846 {