* Channel was ACK'd by remote peer, mark as ready and cancel retransmission.
*
* @param ch Channel to mark as ready.
- * @param fwd Was the ACK message sent fwd? (dest->root, SYNACK)
+ * @param fwd Was the ACK message a FWD ACK? (dest->root, SYNACK)
*/
static void
channel_confirm (struct MeshChannel *ch, int fwd)
void
GMCH_allow_client (struct MeshChannel *ch, int fwd)
{
+ if (MESH_CHANNEL_READY != ch->state)
+ return;
+
send_client_ack (ch, fwd);
}
return;
}
if (NULL == t->channel_head ||
- GNUNET_NO == GMCH_is_origin (t->channel_head->ch, fwd))
+ GNUNET_NO == GMCH_is_origin (t->channel_head->ch, !fwd))
{
GNUNET_break (0);
return;