- fix coverity
[oweals/gnunet.git] / src / transport / test_transport_api_timeout.c
index 7ba74b2e9295f2baf5d31774152e5e165713860f..89fabdefdc4d3d076e5558e539305710107f7e84 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
@@ -58,7 +58,7 @@ static struct PeerContext *p1;
 
 static struct PeerContext *p2;
 
-static GNUNET_TRANSPORT_TESTING_ConnectRequest cc;
+static struct GNUNET_TRANSPORT_TESTING_ConnectRequest * cc;
 
 static struct GNUNET_TRANSPORT_TransmitHandle *th;
 
@@ -120,8 +120,9 @@ end ()
   GNUNET_TRANSPORT_TESTING_done (tth);
 }
 
+
 static void
-end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+end_badly (void *cls)
 {
   die_task = NULL;
 
@@ -181,15 +182,11 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 
 
 static void
-timer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+timer (void *cls)
 {
   static int percentage;
 
   timer_task = NULL;
-
-  if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
-    return;
-
   percentage += 10;
   time_running =
       GNUNET_TIME_relative_add (time_running,
@@ -211,6 +208,7 @@ timer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
 }
 
+
 static void
 testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
 {