diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-07-21 00:15:24 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-07-21 00:15:24 +0000 |
commit | c71f4ec2f893ace0fb9ce7c6b98d799bb79bd30e (patch) | |
tree | b1035312038d88f9fe3eb092cf9dc44a573b9378 /src/cadet | |
parent | 2c0aed48a0c9507ea50b1683b7dc1cced822713d (diff) | |
download | gnunet-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.c | 2 | ||||
-rw-r--r-- | src/cadet/gnunet-service-cadet_tunnel.c | 5 |
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 | { |