From: Christian Grothoff Date: Wed, 25 Jan 2017 19:04:32 +0000 (+0100) Subject: handle ACKs past client down X-Git-Tag: taler-0.2.1~294 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=602249cc05e5817019e6cf9802dc00ec8fd1e7ce;p=oweals%2Fgnunet.git handle ACKs past client down --- 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