fix
[oweals/gnunet.git] / src / util / test_scheduler.c
index 3d8ae979c9e85ba660d4774e40655d96ef3cf943..e2a28c1b7a188e761116855fbb4d2e5127dd86f5 100644 (file)
@@ -27,7 +27,7 @@
 #include "gnunet_time_lib.h"
 #include "gnunet_disk_lib.h"
 
-#define VERBOSE GNUNET_NO
+#define VERBOSE GNUNET_EXTRA_LOGGING
 
 static void
 task3 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -36,7 +36,7 @@ task3 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   /* t4 should be ready (albeit with lower priority) */
   GNUNET_assert (1 ==
-                 GNUNET_SCHEDULER_get_load (GNUNET_SCHEDULER_PRIORITY_COUNT));
+                GNUNET_SCHEDULER_get_load (GNUNET_SCHEDULER_PRIORITY_COUNT));
   GNUNET_assert (3 == *ok);
   (*ok) = 4;
 }
@@ -51,7 +51,7 @@ task2 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   (*ok) = 3;
   /* t3 will go before t4: higher priority */
   GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_UI, &task3,
-                                      cls);
+                                     cls);
 }
 
 static void
@@ -106,8 +106,8 @@ taskRd (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_assert (GNUNET_NETWORK_fdset_handle_isset (tc->read_ready, fds[0]));
   GNUNET_assert (1 == GNUNET_DISK_file_read (fds[0], &c, 1));
   (*ok) = 8;
-  GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE, &taskLast,
-                                      cls);
+  GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE,
+                                     &taskLast, cls);
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -123,10 +123,10 @@ task5 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_assert (NULL != p);
   fds[0] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_READ);
   fds[1] = GNUNET_DISK_pipe_handle (p, GNUNET_DISK_PIPE_END_WRITE);
-  GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, fds[0], &taskRd,
-                                  cls);
+  GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, fds[0],
+                                 &taskRd, cls);
   GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL, fds[1],
-                                   &taskWrt, cls);
+                                  &taskWrt, cls);
 }
 
 
@@ -226,7 +226,7 @@ taskCancel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_assert (1 == *ok);
   *ok = 0;
   GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_add_after
-                           (GNUNET_SCHEDULER_NO_TASK, &taskNeverRun, NULL));
+                          (GNUNET_SCHEDULER_NO_TASK, &taskNeverRun, NULL));
 }