- fix coverity
[oweals/gnunet.git] / src / transport / test_transport_api_bidirectional_connect.c
index f7f284a9a2474f08c1555b6ac9482434c25abb55..a5d6b6b710884ba6a6855dd9c5272531893bc468 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2009, 2010 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2009, 2010 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -95,7 +95,7 @@ end ()
 
 
 static void
-end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+end_badly (void *cls)
 {
   die_task = NULL;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n");
@@ -208,14 +208,12 @@ notify_ready (void *cls, size_t size, void *buf)
 
 
 static void
-sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+sendtask (void *cls)
 {
-  send_task = NULL;
-
-  if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
-    return;
-  char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id));
+  char *receiver_s;
 
+  send_task = NULL;
+  receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Sending message from peer %u (`%4s') -> peer %u (`%s') !\n",
               p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);