fix task cleanup on CTRL-D
authorChristian Grothoff <christian@grothoff.org>
Sun, 29 Jan 2017 18:44:30 +0000 (19:44 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sun, 29 Jan 2017 18:44:30 +0000 (19:44 +0100)
src/cadet/gnunet-cadet.c

index 80010ec54b3a47ddb0d3de5ed7477068fa997d6e..043318ff37c631b930a446e7f4a28bb0950d2b5d 100644 (file)
@@ -313,6 +313,7 @@ read_stdio (void *cls)
 {
   static char buf[60000];
 
+  rd_task = NULL;
   data_size = read (0, buf, 60000);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "stdio read %u bytes\n",
@@ -464,6 +465,7 @@ channel_incoming (void *cls,
 static void
 send_echo (void *cls)
 {
+  echo_task = NULL;
   if (NULL == ch)
     return;
   GNUNET_assert (NULL == th);
@@ -540,9 +542,9 @@ create_channel (void *cls)
  */
 static int
 data_callback (void *cls,
-       struct GNUNET_CADET_Channel *channel,
-       void **channel_ctx,
-       const struct GNUNET_MessageHeader *message)
+               struct GNUNET_CADET_Channel *channel,
+               void **channel_ctx,
+               const struct GNUNET_MessageHeader *message)
 {
   uint16_t len;
   ssize_t done;