From 52255b0df008cd1c2db056def973d67cf51885a4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 22 Jan 2017 23:55:00 +0100 Subject: [PATCH] remove actually problematic client_allowed check --- src/cadet/gnunet-service-cadet-new_channel.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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. */ -- 2.25.1