diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-01-29 19:44:30 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-01-29 19:44:30 +0100 |
commit | 9f4bc1121c34560a72a09db49e5b163a64eb5b06 (patch) | |
tree | 0908d88089b19e8a13f504884906e244ee06e8f4 /src/cadet/gnunet-cadet.c | |
parent | 3aa6278495c8b0824ce8e16f2b1ff302662814a2 (diff) | |
download | gnunet-9f4bc1121c34560a72a09db49e5b163a64eb5b06.tar.gz gnunet-9f4bc1121c34560a72a09db49e5b163a64eb5b06.zip |
fix task cleanup on CTRL-D
Diffstat (limited to 'src/cadet/gnunet-cadet.c')
-rw-r--r-- | src/cadet/gnunet-cadet.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c index 80010ec54..043318ff3 100644 --- a/src/cadet/gnunet-cadet.c +++ b/src/cadet/gnunet-cadet.c | |||
@@ -313,6 +313,7 @@ read_stdio (void *cls) | |||
313 | { | 313 | { |
314 | static char buf[60000]; | 314 | static char buf[60000]; |
315 | 315 | ||
316 | rd_task = NULL; | ||
316 | data_size = read (0, buf, 60000); | 317 | data_size = read (0, buf, 60000); |
317 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 318 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
318 | "stdio read %u bytes\n", | 319 | "stdio read %u bytes\n", |
@@ -464,6 +465,7 @@ channel_incoming (void *cls, | |||
464 | static void | 465 | static void |
465 | send_echo (void *cls) | 466 | send_echo (void *cls) |
466 | { | 467 | { |
468 | echo_task = NULL; | ||
467 | if (NULL == ch) | 469 | if (NULL == ch) |
468 | return; | 470 | return; |
469 | GNUNET_assert (NULL == th); | 471 | GNUNET_assert (NULL == th); |
@@ -540,9 +542,9 @@ create_channel (void *cls) | |||
540 | */ | 542 | */ |
541 | static int | 543 | static int |
542 | data_callback (void *cls, | 544 | data_callback (void *cls, |
543 | struct GNUNET_CADET_Channel *channel, | 545 | struct GNUNET_CADET_Channel *channel, |
544 | void **channel_ctx, | 546 | void **channel_ctx, |
545 | const struct GNUNET_MessageHeader *message) | 547 | const struct GNUNET_MessageHeader *message) |
546 | { | 548 | { |
547 | uint16_t len; | 549 | uint16_t len; |
548 | ssize_t done; | 550 | ssize_t done; |