allow empty/NULL context message
[oweals/gnunet.git] / src / transport / test_transport_api_manipulation_recv_tcp.c
index 48e0fe418ad9ce918111dbe5b62aba2d0df179ff..02c9408a6d2f6dea44e2482da26205df166e3ea1 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
@@ -104,8 +104,9 @@ end ()
   GNUNET_TRANSPORT_TESTING_stop_peer (tth, p2);
 }
 
+
 static void
-end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+end_badly (void *cls)
 {
   die_task = NULL;
 
@@ -158,7 +159,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
 
 static void
-sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+sendtask (void *cls);
+
 
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
@@ -288,13 +290,9 @@ 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));
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,