From 602249cc05e5817019e6cf9802dc00ec8fd1e7ce Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 Jan 2017 20:04:32 +0100 Subject: [PATCH] handle ACKs past client down --- src/cadet/gnunet-service-cadet-new_channel.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c index 29ad732b0..83911f530 100644 --- a/src/cadet/gnunet-service-cadet-new_channel.c +++ b/src/cadet/gnunet-service-cadet-new_channel.c @@ -861,9 +861,16 @@ send_ack_to_client (struct CadetChannel *ch, struct GNUNET_CADET_LocalAck *ack; struct CadetChannelClient *ccc; + ccc = (GNUNET_YES == to_owner) ? ch->owner : ch->dest; + if (NULL == ccc) + { + /* This can happen if we are just getting ACKs after + our local client already disconnected. */ + GNUNET_assert (GNUNET_YES == ch->destroy); + return; + } env = GNUNET_MQ_msg (ack, GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK); - ccc = (GNUNET_YES == to_owner) ? ch->owner : ch->dest; ack->ccn = ccc->ccn; LOG (GNUNET_ERROR_TYPE_DEBUG, "Sending CADET_LOCAL_ACK to %s (%s) at ccn %X (%u/%u pending)\n", @@ -1432,6 +1439,7 @@ cmp_crm_by_next_retry (void *cls, return GNUNET_NO; } + /** * Function called once the tunnel has sent one of our messages. * If the message is unreliable, simply frees the `crm`. If the -- 2.25.1