{
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));
}
if (NULL == t->kx_ctx)
+ {
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)))
{
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);
+ }
+ 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;