-docu, style fixes
[oweals/gnunet.git] / src / fragmentation / test_fragmentation.c
index 2a30d7d93e716cd373cfca58168f67d978d085f4..50779c98b9fa16faae62be9c6d40415f2debb170 100644 (file)
@@ -60,7 +60,7 @@ static struct GNUNET_BANDWIDTH_Tracker trackers[NUM_MSGS];
 
 static struct GNUNET_FRAGMENT_Context *frags[NUM_MSGS];
 
-static GNUNET_SCHEDULER_TaskIdentifier shutdown_task;
+static struct GNUNET_SCHEDULER_Task * shutdown_task;
 
 static void
 do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -68,7 +68,7 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   unsigned int i;
 
   ret = 0;
-  shutdown_task = GNUNET_SCHEDULER_NO_TASK;
+  shutdown_task = NULL;
   GNUNET_DEFRAGMENT_context_destroy (defrag);
   defrag = NULL;
   for (i = 0; i < NUM_MSGS; i++)
@@ -102,7 +102,7 @@ proc_msgs (void *cls, const struct GNUNET_MessageHeader *hdr)
   /* tolerate 10% loss, i.e. due to duplicate fragment IDs */
   if ((total >= NUM_MSGS - (NUM_MSGS / 10)) && (ret != 0))
   {
-    if (GNUNET_SCHEDULER_NO_TASK == shutdown_task)
+    if (NULL == shutdown_task)
       shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
   }
 }
@@ -213,8 +213,8 @@ run (void *cls, char *const *args, const char *cfgfile,
         htons (sizeof (struct GNUNET_MessageHeader) + (17 * i) % (32 * 1024));
     frags[i] = GNUNET_FRAGMENT_context_create (NULL /* no stats */ ,
                                                MTU, &trackers[i],
-                                               GNUNET_TIME_UNIT_MILLISECONDS, 
-                                               GNUNET_TIME_UNIT_SECONDS, 
+                                               GNUNET_TIME_UNIT_MILLISECONDS,
+                                               GNUNET_TIME_UNIT_SECONDS,
                                               msg,
                                                &proc_frac, &frags[i]);
   }
@@ -241,7 +241,7 @@ main (int argc, char *argv[])
                     "WARNING",
                     NULL);
   for (i = 0; i < NUM_MSGS; i++)
-    GNUNET_BANDWIDTH_tracker_init (&trackers[i],
+    GNUNET_BANDWIDTH_tracker_init (&trackers[i], NULL, NULL,
                                    GNUNET_BANDWIDTH_value_init ((i + 1) * 1024),
                                    100);
   GNUNET_PROGRAM_run (5, argv_prog, "test-fragmentation", "nohelp", options,