From: Bart Polot Date: Wed, 4 Dec 2013 16:45:03 +0000 (+0000) Subject: - don't mark duplicate channel_confirm messages as error X-Git-Tag: initial-import-from-subversion-38251~5797 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=80d214d5c173c4cf9730966968f74f85ab9cc299;p=oweals%2Fgnunet.git - don't mark duplicate channel_confirm messages as error --- diff --git a/src/mesh/gnunet-service-mesh_channel.c b/src/mesh/gnunet-service-mesh_channel.c index 0775c8fa3..123b208a0 100644 --- a/src/mesh/gnunet-service-mesh_channel.c +++ b/src/mesh/gnunet-service-mesh_channel.c @@ -1053,10 +1053,12 @@ static void channel_confirm (struct MeshChannel *ch, int fwd) { struct MeshChannelReliability *rel; + enum MeshChannelState oldstate; LOG (GNUNET_ERROR_TYPE_DEBUG, " channel confirm %s %s:%X\n", GM_f2s (fwd), GMT_2s (ch->t), ch->gid); + oldstate = ch->state; ch->state = MESH_CHANNEL_READY; rel = fwd ? ch->root_rel : ch->dest_rel; @@ -1077,7 +1079,7 @@ channel_confirm (struct MeshChannel *ch, int fwd) else { /* We SHOULD have been trying to retransmit this! */ - GNUNET_break (0); + GNUNET_break (oldstate == MESH_CHANNEL_READY); } /* In case of a FWD ACK (SYNACK) send a BCK ACK (ACK). */