From 46364cf0f70240da919cc24eea81a10c44feb707 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Sat, 30 Nov 2013 01:31:11 +0000 Subject: [PATCH] - initialize timers --- src/mesh/gnunet-service-mesh_channel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesh/gnunet-service-mesh_channel.c b/src/mesh/gnunet-service-mesh_channel.c index 0739ad021..5a97cb655 100644 --- a/src/mesh/gnunet-service-mesh_channel.c +++ b/src/mesh/gnunet-service-mesh_channel.c @@ -733,7 +733,10 @@ ch_message_sent (void *cls, GNUNET_assert (rel->uniq == ch_q); if (MESH_CHANNEL_READY != rel->ch->state) { + struct GNUNET_TIME_Relative delay; + GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == rel->retry_task); + rel->retry_timer = GNUNET_TIME_STD_BACKOFF (rel->retry_timer); rel->retry_task = GNUNET_SCHEDULER_add_delayed (rel->retry_timer, &channel_recreate, rel); } @@ -1041,6 +1044,7 @@ channel_confirm (struct MeshChannel *ch, int fwd) rel = fwd ? ch->root_rel : ch->dest_rel; rel->client_ready = GNUNET_YES; + rel->expected_delay = rel->retry_timer; send_client_ack (ch, fwd); if (GNUNET_SCHEDULER_NO_TASK != rel->retry_task) @@ -1732,6 +1736,7 @@ GMCH_handle_local_create (struct MeshClient *c, /* In unreliable channels, we'll use the DLL to buffer BCK data */ ch->root_rel = GNUNET_new (struct MeshChannelReliability); ch->root_rel->ch = ch; + ch->root_rel->retry_timer = GNUNET_TIME_UNIT_SECONDS; ch->root_rel->expected_delay.rel_value_us = 0; LOG (GNUNET_ERROR_TYPE_DEBUG, "CREATED CHANNEL %s\n", GMCH_2s (ch)); -- 2.25.1