gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r32703 - in gnunet/src: ats-tests util


From: gnunet
Subject: [GNUnet-SVN] r32703 - in gnunet/src: ats-tests util
Date: Thu, 20 Mar 2014 10:58:43 +0100

Author: wachs
Date: 2014-03-20 10:58:43 +0100 (Thu, 20 Mar 2014)
New Revision: 32703

Modified:
   gnunet/src/ats-tests/ats-testing-experiment.c
   gnunet/src/ats-tests/ats-testing.h
   gnunet/src/ats-tests/gnunet-solver-eval.c
   gnunet/src/util/bandwidth.c
Log:
renaming generator type for ats
addign comment for bandwidth



Modified: gnunet/src/ats-tests/ats-testing-experiment.c
===================================================================
--- gnunet/src/ats-tests/ats-testing-experiment.c       2014-03-20 09:57:59 UTC 
(rev 32702)
+++ gnunet/src/ats-tests/ats-testing-experiment.c       2014-03-20 09:58:43 UTC 
(rev 32703)
@@ -188,19 +188,19 @@
       /* Load arguments for set_rate, start_send, set_preference */
       if (0 == strcmp (type, "constant"))
       {
-        o->tg_type = GNUNET_ATS_TEST_TG_CONSTANT;
+        o->gen_type = GNUNET_ATS_TEST_TG_CONSTANT;
       }
       else if (0 == strcmp (type, "linear"))
       {
-        o->tg_type = GNUNET_ATS_TEST_TG_LINEAR;
+        o->gen_type = GNUNET_ATS_TEST_TG_LINEAR;
       }
       else if (0 == strcmp (type, "sinus"))
       {
-        o->tg_type = GNUNET_ATS_TEST_TG_SINUS;
+        o->gen_type = GNUNET_ATS_TEST_TG_SINUS;
       }
       else if (0 == strcmp (type, "random"))
       {
-        o->tg_type = GNUNET_ATS_TEST_TG_RANDOM;
+        o->gen_type = GNUNET_ATS_TEST_TG_RANDOM;
       }
       else
       {
@@ -232,9 +232,9 @@
       if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (cfg,
           sec_name, op_name, &o->max_rate))
       {
-        if ((GNUNET_ATS_TEST_TG_LINEAR == o->tg_type) ||
-            (GNUNET_ATS_TEST_TG_RANDOM == o->tg_type) ||
-            (GNUNET_ATS_TEST_TG_SINUS == o->tg_type))
+        if ((GNUNET_ATS_TEST_TG_LINEAR == o->gen_type) ||
+            (GNUNET_ATS_TEST_TG_RANDOM == o->gen_type) ||
+            (GNUNET_ATS_TEST_TG_SINUS == o->gen_type))
         {
           fprintf (stderr, "Missing max rate in operation %u `%s' in episode 
%u\n",
               op_counter, op, cur->id);
@@ -306,8 +306,8 @@
     }
 
     /* Safety checks */
-    if ((GNUNET_ATS_TEST_TG_LINEAR == o->tg_type) ||
-        (GNUNET_ATS_TEST_TG_SINUS == o->tg_type))
+    if ((GNUNET_ATS_TEST_TG_LINEAR == o->gen_type) ||
+        (GNUNET_ATS_TEST_TG_SINUS == o->gen_type))
     {
       if ((o->max_rate - o->base_rate) > o->base_rate)
       {
@@ -437,7 +437,7 @@
   }
 
   partner->tg = GNUNET_ATS_TEST_generate_traffic_start(peer, partner,
-      op->tg_type, op->base_rate, op->max_rate, op->period,
+      op->gen_type, op->base_rate, op->max_rate, op->period,
       GNUNET_TIME_UNIT_FOREVER_REL);
 }
 
@@ -495,7 +495,7 @@
   }
 
   partner->pg = GNUNET_ATS_TEST_generate_preferences_start(peer, partner,
-      op->tg_type, op->base_rate, op->max_rate, op->period, op->frequency,
+      op->gen_type, op->base_rate, op->max_rate, op->period, op->frequency,
       op->pref_type);
 }
 

Modified: gnunet/src/ats-tests/ats-testing.h
===================================================================
--- gnunet/src/ats-tests/ats-testing.h  2014-03-20 09:57:59 UTC (rev 32702)
+++ gnunet/src/ats-tests/ats-testing.h  2014-03-20 09:58:43 UTC (rev 32703)
@@ -496,7 +496,7 @@
   struct GNUNET_TIME_Relative frequency;
 
   enum OperationType type;
-  enum GeneratorType tg_type;
+  enum GeneratorType gen_type;
   enum GNUNET_ATS_PreferenceKind pref_type;
 };
 

Modified: gnunet/src/ats-tests/gnunet-solver-eval.c
===================================================================
--- gnunet/src/ats-tests/gnunet-solver-eval.c   2014-03-20 09:57:59 UTC (rev 
32702)
+++ gnunet/src/ats-tests/gnunet-solver-eval.c   2014-03-20 09:58:43 UTC (rev 
32703)
@@ -195,19 +195,19 @@
       /* Load arguments for set_rate, start_send, set_preference */
       if (0 == strcmp (type, "constant"))
       {
-        o->tg_type = GNUNET_ATS_TEST_TG_CONSTANT;
+        o->gen_type = GNUNET_ATS_TEST_TG_CONSTANT;
       }
       else if (0 == strcmp (type, "linear"))
       {
-        o->tg_type = GNUNET_ATS_TEST_TG_LINEAR;
+        o->gen_type = GNUNET_ATS_TEST_TG_LINEAR;
       }
       else if (0 == strcmp (type, "sinus"))
       {
-        o->tg_type = GNUNET_ATS_TEST_TG_SINUS;
+        o->gen_type = GNUNET_ATS_TEST_TG_SINUS;
       }
       else if (0 == strcmp (type, "random"))
       {
-        o->tg_type = GNUNET_ATS_TEST_TG_RANDOM;
+        o->gen_type = GNUNET_ATS_TEST_TG_RANDOM;
       }
       else
       {
@@ -239,9 +239,9 @@
       if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (cfg,
           sec_name, op_name, &o->max_rate))
       {
-        if ((GNUNET_ATS_TEST_TG_LINEAR == o->tg_type) ||
-            (GNUNET_ATS_TEST_TG_RANDOM == o->tg_type) ||
-            (GNUNET_ATS_TEST_TG_SINUS == o->tg_type))
+        if ((GNUNET_ATS_TEST_TG_LINEAR == o->gen_type) ||
+            (GNUNET_ATS_TEST_TG_RANDOM == o->gen_type) ||
+            (GNUNET_ATS_TEST_TG_SINUS == o->gen_type))
         {
           fprintf (stderr, "Missing max rate in operation %u `%s' in episode 
%u\n",
               op_counter, op, cur->id);
@@ -313,8 +313,8 @@
     }
 
     /* Safety checks */
-    if ((GNUNET_ATS_TEST_TG_LINEAR == o->tg_type) ||
-        (GNUNET_ATS_TEST_TG_SINUS == o->tg_type))
+    if ((GNUNET_ATS_TEST_TG_LINEAR == o->gen_type) ||
+        (GNUNET_ATS_TEST_TG_SINUS == o->gen_type))
     {
       if ((o->max_rate - o->base_rate) > o->base_rate)
       {

Modified: gnunet/src/util/bandwidth.c
===================================================================
--- gnunet/src/util/bandwidth.c 2014-03-20 09:57:59 UTC (rev 32702)
+++ gnunet/src/util/bandwidth.c 2014-03-20 09:58:43 UTC (rev 32703)
@@ -196,6 +196,9 @@
  * ignored and replaced by #GNUNET_SERVER_MAX_MESSAGE_SIZE (which is in
  * bytes).
  *
+ * To stop notifications about updates and excess callbacks use
+ * #GNUNET_BANDWIDTH_tracker_notification_stop
+ *
  * @param av tracker to initialize
  * @param update_cb callback to notify a client about the tracker being updated
  * @param update_cb_cls cls for the callback




reply via email to

[Prev in Thread] Current Thread [Next in Thread]