Don't pass NULL to destroy_route
[oweals/gnunet.git] / src / cadet / gnunet-cadet.c
index 72d7bf8a9339ba583d3b86477d04c06677612035..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;
@@ -727,7 +729,7 @@ tunnel_callback (void *cls,
                  const struct GNUNET_PeerIdentity *peer,
                  unsigned int n_channels,
                  unsigned int n_connections,
-                 const struct GNUNET_CADET_ChannelNumber *channels,
+                 const struct GNUNET_CADET_ChannelTunnelNumber *channels,
                  const struct GNUNET_CADET_ConnectionTunnelIdentifier *connections,
                  unsigned int estate,
                  unsigned int cstate)