- don't mark duplicate channel_confirm messages as error
authorBart Polot <bart@net.in.tum.de>
Wed, 4 Dec 2013 16:45:03 +0000 (16:45 +0000)
committerBart Polot <bart@net.in.tum.de>
Wed, 4 Dec 2013 16:45:03 +0000 (16:45 +0000)
src/mesh/gnunet-service-mesh_channel.c

index 0775c8fa3ee935eea2db4f9d141500fba23813e0..123b208a018330f81a08724e922e2e4d8eafd456 100644 (file)
@@ -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). */