allow empty/NULL context message
[oweals/gnunet.git] / src / transport / test_transport_api_reliability.c
index 0b80477bfbb330db921f3b8c6b4b88685cc88560..fe2ac78e07e7a08386d0259c44dadaac2e942a57 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
@@ -161,7 +161,7 @@ static int test_send_timeout;
  */
 static char bitmap[TOTAL_MSGS / 8];
 
-static GNUNET_TRANSPORT_TESTING_ConnectRequest cc;
+static struct GNUNET_TRANSPORT_TESTING_ConnectRequest * cc;
 
 /*
  * END Testcase specific declarations
@@ -318,8 +318,9 @@ set_bit (unsigned int bitIdx)
   if (bitIdx >= sizeof (bitmap) * 8)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "tried to set bit %d of %d(!?!?)\n",
-                bitIdx, sizeof (bitmap) * 8);
+                "tried to set bit %u of %u(!?!?)\n",
+                bitIdx,
+                (unsigned int) sizeof (bitmap) * 8);
     return GNUNET_SYSERR;
   }
   arraySlot = bitIdx / 8;
@@ -341,8 +342,10 @@ get_bit (const char *map, unsigned int bit)
 {
   if (bit > TOTAL_MSGS)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "get bit %d of %d(!?!?)\n", bit,
-                sizeof (bitmap) * 8);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "get bit %u of %u(!?!?)\n",
+                bit,
+                (unsigned int) sizeof (bitmap) * 8);
     return 0;
   }
   return ((map)[bit >> 3] & (1 << (bit & 7))) > 0;
@@ -526,8 +529,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 
 
 static void
-sendtask (void *cls,
-          const struct GNUNET_SCHEDULER_TaskContext *tc)
+sendtask (void *cls)
 {
   start_time = GNUNET_TIME_absolute_get ();
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,