From: Christian Grothoff Date: Sun, 22 Jan 2017 22:55:00 +0000 (+0100) Subject: remove actually problematic client_allowed check X-Git-Tag: taler-0.2.1~345 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=52255b0df008cd1c2db056def973d67cf51885a4;p=oweals%2Fgnunet.git remove actually problematic client_allowed check --- diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c index b92c4eaf5..f45c5e5ce 100644 --- a/src/cadet/gnunet-service-cadet-new_channel.c +++ b/src/cadet/gnunet-service-cadet-new_channel.c @@ -286,11 +286,6 @@ struct CadetChannel */ int client_ready; - /** - * Can the client send data to us? - */ - int client_allowed; - /** * Is the tunnel bufferless (minimum latency)? */ @@ -1165,8 +1160,6 @@ GCCH_check_allow_client (struct CadetChannel *ch) struct GNUNET_MQ_Envelope *env; struct GNUNET_CADET_LocalAck *msg; - if (GNUNET_YES == ch->client_allowed) - return; /* client already allowed! */ if (CADET_CHANNEL_READY != ch->state) { /* destination did not yet ACK our CREATE! */ @@ -1191,8 +1184,6 @@ GCCH_check_allow_client (struct CadetChannel *ch) GCCH_2s (ch)); return; } - ch->client_allowed = GNUNET_YES; - LOG (GNUNET_ERROR_TYPE_DEBUG, "Sending local ack to %s client\n", @@ -1292,12 +1283,11 @@ GCCH_handle_local_data (struct CadetChannel *ch, { struct CadetReliableMessage *crm; - if (GNUNET_NO == ch->client_allowed) + if (ch->pending_messages > ch->max_pending_messages) { GNUNET_break (0); return GNUNET_SYSERR; } - ch->client_allowed = GNUNET_NO; ch->pending_messages++; /* Everything is correct, send the message. */