-nicer logging
[oweals/gnunet.git] / src / ats-tests / ats-testing-preferences.c
index 71ae342b8624c144862467d07c57d46aec9557f6..e5f32d6b12671d97ce7c0a93e324b06553da59aa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  This file is part of GNUnet.
- (C) 2010-2013 Christian Grothoff (and other contributing authors)
Copyright (C) 2010-2013 Christian Grothoff (and other contributing authors)
 
  GNUnet is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published
@@ -96,7 +96,7 @@ set_pref_task (void *cls,
 {
   struct BenchmarkPartner *p = cls;
   double pref_value;
-  p->pg->set_task = GNUNET_SCHEDULER_NO_TASK;
+  p->pg->set_task = NULL;
 
   pref_value = get_preference (p->pg);
 
@@ -106,7 +106,10 @@ set_pref_task (void *cls,
       GNUNET_ATS_print_preference_type (p->pg->kind), pref_value);
 
   GNUNET_ATS_performance_change_preference(p->me->ats_perf_handle,
-      &p->dest->id, p->pg->kind, pref_value, GNUNET_ATS_PREFERENCE_END);
+                                           &p->dest->id,
+                                           p->pg->kind,
+                                           pref_value,
+                                           GNUNET_ATS_PREFERENCE_END);
 
   switch (p->pg->kind) {
     case GNUNET_ATS_PREFERENCE_BANDWIDTH:
@@ -132,11 +135,12 @@ set_pref_task (void *cls,
  * @param src source
  * @param dest partner
  * @param type type of preferences to generate
- * @param base_rate traffic base rate to send data with
- * @param max_rate  traffic maximum rate to send data with
- * @param period duration of a period of traffic generation (~ 1/frequency)
- * @param duration how long to generate traffic
- * @return the traffic generator
+ * @param base_value traffic base rate to send data with
+ * @param value_rate  traffic maximum rate to send data with
+ * @param period duration of a period of preferences generation (~ 1/frequency)
+ * @param frequency how long to generate preferences
+ * @param kind ATS preference to generate
+ * @return the preference generator
  */
 struct PreferenceGenerator *
 GNUNET_ATS_TEST_generate_preferences_start (struct BenchmarkPeer *src,
@@ -213,10 +217,10 @@ GNUNET_ATS_TEST_generate_preferences_stop (struct PreferenceGenerator *pg)
   GNUNET_CONTAINER_DLL_remove (pg_head, pg_tail, pg);
   pg->dest->pg = NULL;
 
-  if (GNUNET_SCHEDULER_NO_TASK != pg->set_task)
+  if (NULL != pg->set_task)
   {
     GNUNET_SCHEDULER_cancel (pg->set_task);
-    pg->set_task = GNUNET_SCHEDULER_NO_TASK;
+    pg->set_task = NULL;
   }
 
   GNUNET_free (pg);
@@ -240,4 +244,3 @@ GNUNET_ATS_TEST_generate_preferences_stop_all ()
 }
 
 /* end of file ats-testing-preferences.c */
-