diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-01-25 20:04:32 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-01-25 20:04:32 +0100 |
commit | 602249cc05e5817019e6cf9802dc00ec8fd1e7ce (patch) | |
tree | 12eefb4ffedfa3812cc3a61cf77e968551c2faf1 /src/cadet/gnunet-service-cadet-new_channel.c | |
parent | a6a84661da2dc124560dfdfdb92304f3e9bdf92e (diff) | |
download | gnunet-602249cc05e5817019e6cf9802dc00ec8fd1e7ce.tar.gz gnunet-602249cc05e5817019e6cf9802dc00ec8fd1e7ce.zip |
handle ACKs past client down
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new_channel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_channel.c | 10 |
1 files changed, 9 insertions, 1 deletions
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, | |||
861 | struct GNUNET_CADET_LocalAck *ack; | 861 | struct GNUNET_CADET_LocalAck *ack; |
862 | struct CadetChannelClient *ccc; | 862 | struct CadetChannelClient *ccc; |
863 | 863 | ||
864 | ccc = (GNUNET_YES == to_owner) ? ch->owner : ch->dest; | ||
865 | if (NULL == ccc) | ||
866 | { | ||
867 | /* This can happen if we are just getting ACKs after | ||
868 | our local client already disconnected. */ | ||
869 | GNUNET_assert (GNUNET_YES == ch->destroy); | ||
870 | return; | ||
871 | } | ||
864 | env = GNUNET_MQ_msg (ack, | 872 | env = GNUNET_MQ_msg (ack, |
865 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK); | 873 | GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK); |
866 | ccc = (GNUNET_YES == to_owner) ? ch->owner : ch->dest; | ||
867 | ack->ccn = ccc->ccn; | 874 | ack->ccn = ccc->ccn; |
868 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 875 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
869 | "Sending CADET_LOCAL_ACK to %s (%s) at ccn %X (%u/%u pending)\n", | 876 | "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, | |||
1432 | return GNUNET_NO; | 1439 | return GNUNET_NO; |
1433 | } | 1440 | } |
1434 | 1441 | ||
1442 | |||
1435 | /** | 1443 | /** |
1436 | * Function called once the tunnel has sent one of our messages. | 1444 | * Function called once the tunnel has sent one of our messages. |
1437 | * If the message is unreliable, simply frees the `crm`. If the | 1445 | * If the message is unreliable, simply frees the `crm`. If the |