projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
26d3e4b
)
- fix #3479
author
Bart Polot
<bart@net.in.tum.de>
Wed, 2 Jul 2014 19:30:48 +0000
(19:30 +0000)
committer
Bart Polot
<bart@net.in.tum.de>
Wed, 2 Jul 2014 19:30:48 +0000
(19:30 +0000)
src/cadet/gnunet-service-cadet_tunnel.c
patch
|
blob
|
history
diff --git
a/src/cadet/gnunet-service-cadet_tunnel.c
b/src/cadet/gnunet-service-cadet_tunnel.c
index 72e4cf6ff1c3b922026d8a3671c0afd4319ac0dd..71b85966502c628564317e73a30c51c674ff2f9d 100644
(file)
--- a/
src/cadet/gnunet-service-cadet_tunnel.c
+++ b/
src/cadet/gnunet-service-cadet_tunnel.c
@@
-1350,6
+1350,12
@@
rekey_tunnel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct GNUNET_TIME_Relative duration;
{
struct GNUNET_TIME_Relative duration;
+ if (GNUNET_SCHEDULER_NO_TASK != t->kx_ctx->finish_task)
+ {
+ GNUNET_SCHEDULER_cancel (t->kx_ctx->finish_task);
+ t->kx_ctx->finish_task = GNUNET_SCHEDULER_NO_TASK;
+ }
+
duration = GNUNET_TIME_absolute_get_duration (t->kx_ctx->rekey_start_time);
LOG (GNUNET_ERROR_TYPE_DEBUG, " kx started %s ago\n",
GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES));
duration = GNUNET_TIME_absolute_get_duration (t->kx_ctx->rekey_start_time);
LOG (GNUNET_ERROR_TYPE_DEBUG, " kx started %s ago\n",
GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES));
@@
-1770,7
+1776,14
@@
handle_ephemeral (struct CadetTunnel *t,
}
if (NULL == t->kx_ctx)
}
if (NULL == t->kx_ctx)
+ {
create_kx_ctx (t);
create_kx_ctx (t);
+ }
+ else if (GNUNET_SCHEDULER_NO_TASK != t->kx_ctx->finish_task)
+ {
+ GNUNET_SCHEDULER_cancel (t->kx_ctx->finish_task);
+ t->kx_ctx->finish_task = GNUNET_SCHEDULER_NO_TASK;
+ }
if (0 != memcmp (&t->peers_ephemeral_key, &msg->ephemeral_key,
sizeof (msg->ephemeral_key)))
{
if (0 != memcmp (&t->peers_ephemeral_key, &msg->ephemeral_key,
sizeof (msg->ephemeral_key)))
{
@@
-1820,7
+1833,14
@@
handle_ping (struct CadetTunnel *t,
LOG (GNUNET_ERROR_TYPE_DEBUG, " got %u\n", res.nonce);
LOG (GNUNET_ERROR_TYPE_DEBUG, " towards %s\n", GNUNET_i2s (&res.target));
if (NULL == t->kx_ctx)
LOG (GNUNET_ERROR_TYPE_DEBUG, " got %u\n", res.nonce);
LOG (GNUNET_ERROR_TYPE_DEBUG, " towards %s\n", GNUNET_i2s (&res.target));
if (NULL == t->kx_ctx)
+ {
create_kx_ctx (t);
create_kx_ctx (t);
+ }
+ else if (GNUNET_SCHEDULER_NO_TASK != t->kx_ctx->finish_task)
+ {
+ GNUNET_SCHEDULER_cancel (t->kx_ctx->finish_task);
+ t->kx_ctx->finish_task = GNUNET_SCHEDULER_NO_TASK;
+ }
send_ephemeral (t);
send_ping (t);
return;
send_ephemeral (t);
send_ping (t);
return;