diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-21 18:10:38 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-21 18:10:38 +0200 |
commit | 61bf943d09cd43ca5fe9de1a8d329b808b0b194d (patch) | |
tree | 7676c015238a5b2d46b56af58bde4643913c3dd0 /src/cadet/gnunet-service-cadet_channel.c | |
parent | 882a4ce1bb696d00abaa841ac88737765588cee9 (diff) | |
download | gnunet-61bf943d09cd43ca5fe9de1a8d329b808b0b194d.tar.gz gnunet-61bf943d09cd43ca5fe9de1a8d329b808b0b194d.zip |
fix crash on unexpected client disconnect on incoming message, remove bogus assertion
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet_channel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c index 7a7942dea..2d8d36c6c 100644 --- a/src/cadet/gnunet-service-cadet_channel.c +++ b/src/cadet/gnunet-service-cadet_channel.c | |||
@@ -1279,8 +1279,7 @@ GCCH_handle_channel_plaintext_data (struct CadetChannel *ch, | |||
1279 | uint32_t delta; | 1279 | uint32_t delta; |
1280 | 1280 | ||
1281 | GNUNET_assert (GNUNET_NO == ch->is_loopback); | 1281 | GNUNET_assert (GNUNET_NO == ch->is_loopback); |
1282 | if ( (GNUNET_YES == ch->destroy) && | 1282 | if ( (NULL == ch->owner) && |
1283 | (NULL == ch->owner) && | ||
1284 | (NULL == ch->dest) ) | 1283 | (NULL == ch->dest) ) |
1285 | { | 1284 | { |
1286 | /* This client is gone, but we still have messages to send to | 1285 | /* This client is gone, but we still have messages to send to |
@@ -1290,8 +1289,9 @@ GCCH_handle_channel_plaintext_data (struct CadetChannel *ch, | |||
1290 | "Dropping incoming payload on %s as this end is already closed\n", | 1289 | "Dropping incoming payload on %s as this end is already closed\n", |
1291 | GCCH_2s (ch)); | 1290 | GCCH_2s (ch)); |
1292 | /* send back DESTROY notification to stop further retransmissions! */ | 1291 | /* send back DESTROY notification to stop further retransmissions! */ |
1293 | GCT_send_channel_destroy (ch->t, | 1292 | if (GNUNET_YES == ch->destroy) |
1294 | ch->ctn); | 1293 | GCT_send_channel_destroy (ch->t, |
1294 | ch->ctn); | ||
1295 | return; | 1295 | return; |
1296 | } | 1296 | } |
1297 | payload_size = ntohs (msg->header.size) - sizeof (*msg); | 1297 | payload_size = ntohs (msg->header.size) - sizeof (*msg); |