diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-28 14:38:56 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-28 14:38:56 +0100 |
commit | 6588438f94ba8053f8b4917b9b30a5165e9181ad (patch) | |
tree | fd88e8dfc929d412639d497b9b7302cee76bf6b1 /src/cadet | |
parent | c9e806d1862c68a7ae765127982622311304a928 (diff) | |
download | gnunet-6588438f94ba8053f8b4917b9b30a5165e9181ad.tar.gz gnunet-6588438f94ba8053f8b4917b9b30a5165e9181ad.zip |
misc minor fixes
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new.c | 8 | ||||
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_channel.c | 10 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/cadet/gnunet-service-cadet-new.c b/src/cadet/gnunet-service-cadet-new.c index b0a818c7c..de85db5b6 100644 --- a/src/cadet/gnunet-service-cadet-new.c +++ b/src/cadet/gnunet-service-cadet-new.c | |||
@@ -716,9 +716,11 @@ handle_local_data (void *cls, | |||
716 | msg->ccn); | 716 | msg->ccn); |
717 | if (NULL == ch) | 717 | if (NULL == ch) |
718 | { | 718 | { |
719 | /* Channel does not exist! */ | 719 | /* Channel does not exist (anymore) */ |
720 | GNUNET_break (0); | 720 | LOG (GNUNET_ERROR_TYPE_WARNING, |
721 | GNUNET_SERVICE_client_drop (c->client); | 721 | "Dropping payload for channel %u from client (channel unknown, other endpoint may have disconnected)\n", |
722 | (unsigned int) ntohl (msg->ccn.channel_of_client)); | ||
723 | GNUNET_SERVICE_client_continue (c->client); | ||
722 | return; | 724 | return; |
723 | } | 725 | } |
724 | payload_size = ntohs (msg->header.size) - sizeof (*msg); | 726 | payload_size = ntohs (msg->header.size) - sizeof (*msg); |
diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c index c418893a8..8769601c2 100644 --- a/src/cadet/gnunet-service-cadet-new_channel.c +++ b/src/cadet/gnunet-service-cadet-new_channel.c | |||
@@ -1618,7 +1618,8 @@ GCCH_handle_remote_destroy (struct CadetChannel *ch, | |||
1618 | return; | 1618 | return; |
1619 | } | 1619 | } |
1620 | ccc = (NULL != ch->owner) ? ch->owner : ch->dest; | 1620 | ccc = (NULL != ch->owner) ? ch->owner : ch->dest; |
1621 | if (NULL != ccc->head_recv) | 1621 | if ( (NULL != ccc) && |
1622 | (NULL != ccc->head_recv) ) | ||
1622 | { | 1623 | { |
1623 | LOG (GNUNET_ERROR_TYPE_WARNING, | 1624 | LOG (GNUNET_ERROR_TYPE_WARNING, |
1624 | "Lost end of transmission due to remote shutdown on %s\n", | 1625 | "Lost end of transmission due to remote shutdown on %s\n", |
@@ -1626,9 +1627,10 @@ GCCH_handle_remote_destroy (struct CadetChannel *ch, | |||
1626 | /* FIXME: change API to notify client about truncated transmission! */ | 1627 | /* FIXME: change API to notify client about truncated transmission! */ |
1627 | } | 1628 | } |
1628 | ch->destroy = GNUNET_YES; | 1629 | ch->destroy = GNUNET_YES; |
1629 | GSC_handle_remote_channel_destroy (ccc->c, | 1630 | if (NULL != ccc) |
1630 | ccc->ccn, | 1631 | GSC_handle_remote_channel_destroy (ccc->c, |
1631 | ch); | 1632 | ccc->ccn, |
1633 | ch); | ||
1632 | channel_destroy (ch); | 1634 | channel_destroy (ch); |
1633 | } | 1635 | } |
1634 | 1636 | ||