From: Bart Polot Date: Sat, 30 Nov 2013 01:57:54 +0000 (+0000) Subject: - refactor mesg sent X-Git-Tag: initial-import-from-subversion-38251~5841 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=17d8308ec87118743364e73e48025256fbd10178;p=oweals%2Fgnunet.git - refactor mesg sent --- diff --git a/src/mesh/gnunet-service-mesh_channel.c b/src/mesh/gnunet-service-mesh_channel.c index ce54571cb..553bddc58 100644 --- a/src/mesh/gnunet-service-mesh_channel.c +++ b/src/mesh/gnunet-service-mesh_channel.c @@ -722,23 +722,19 @@ ch_message_sent (void *cls, case GNUNET_MESSAGE_TYPE_MESH_DATA_ACK: + case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE: rel = ch_q->rel; GNUNET_assert (rel->uniq == ch_q); rel->uniq = NULL; - break; - - case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE: - rel = ch_q->rel; - GNUNET_assert (rel->uniq == ch_q); - if (MESH_CHANNEL_READY != rel->ch->state) + if (MESH_CHANNEL_READY != rel->ch->state + && GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE == type) { 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); } - rel->uniq = NULL; break;