gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r17546 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r17546 - gnunet/src/transport
Date: Mon, 17 Oct 2011 15:28:27 +0200

Author: wachs
Date: 2011-10-17 15:28:27 +0200 (Mon, 17 Oct 2011)
New Revision: 17546

Modified:
   gnunet/src/transport/test_quota_compliance.c
   gnunet/src/transport/test_quota_compliance_unix_asymmetric_peer1.conf
   gnunet/src/transport/test_quota_compliance_unix_asymmetric_peer2.conf
   gnunet/src/transport/test_quota_compliance_unix_peer1.conf
   gnunet/src/transport/test_quota_compliance_unix_peer2.conf
   gnunet/src/transport/test_transport_api_unix_peer2.conf
Log:


Modified: gnunet/src/transport/test_quota_compliance.c
===================================================================
--- gnunet/src/transport/test_quota_compliance.c        2011-10-17 12:54:45 UTC 
(rev 17545)
+++ gnunet/src/transport/test_quota_compliance.c        2011-10-17 13:28:27 UTC 
(rev 17546)
@@ -36,7 +36,7 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_EXTRA_LOGGING
+#define VERBOSE GNUNET_YES
 
 #define VERBOSE_ARM GNUNET_EXTRA_LOGGING
 
@@ -150,24 +150,21 @@
   if (datarate > quota_in_p2)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-        "Datarate of %llu higher than allowed inbound quota of %llu\n", 
datarate, quota_in_p2);
+        "Datarate of %llu b/s higher than allowed inbound quota of %llu 
b/s\n", datarate, quota_in_p2);
     test_failed = GNUNET_YES;
   }
   if (datarate > quota_out_p1)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-        "Datarate of %llu higher than allowed outbound quota of %llu\n", 
datarate, quota_out_p1);
+        "Datarate of %llu b/s higher than allowed outbound quota of %llu 
b/s\n", datarate, quota_out_p1);
     test_failed = GNUNET_YES;
   }
   if (test_failed == GNUNET_NO)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-        "Datarate of %llu complied to allowed outbound quota of %llu and 
inbound quota of %llu\n", datarate, quota_out_p1, quota_in_p2);
+        "Datarate of %llu b/s complied to allowed outbound quota of %llu b/s 
and inbound quota of %llu b/s\n", datarate, quota_out_p1, quota_in_p2);
   }
 
-
-
-
   if (die_task != GNUNET_SCHEDULER_NO_TASK)
     GNUNET_SCHEDULER_cancel (die_task);
 
@@ -189,6 +186,9 @@
   die_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n");
 
+  if (measure_task != GNUNET_SCHEDULER_NO_TASK)
+    GNUNET_SCHEDULER_cancel (measure_task);
+
   if (test_connected == GNUNET_YES)
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Peers got connected\n");
   else
@@ -462,20 +462,19 @@
 }
 
 static char *
-generate_config (char * cfg_file_p1,  unsigned long long  quota_in,  unsigned 
long long  quota_out)
+generate_config (char * cfg_file,  unsigned long long  quota_in,  unsigned 
long long  quota_out)
 {
   char * fname = NULL;
   struct GNUNET_CONFIGURATION_Handle *cfg = GNUNET_CONFIGURATION_create();
-  GNUNET_CONFIGURATION_load (cfg, cfg_file_p1);
-
-  GNUNET_CONFIGURATION_set_value_number(cfg, "core", "TOTAL_QUOTA_IN", 
quota_in);
+  GNUNET_CONFIGURATION_load (cfg, cfg_file);
+  GNUNET_asprintf (&fname, "q_in_%u_q_out_%u_%s", quota_in, quota_out, 
cfg_file);
+  GNUNET_CONFIGURATION_set_value_string(cfg, "PATHS", "DEFAULTCONFIG", fname);
   GNUNET_CONFIGURATION_set_value_number(cfg, "core", "TOTAL_QUOTA_OUT", 
quota_out);
-
-  GNUNET_asprintf (&fname, "q_in_%ull_q_out_%ull_%s", quota_in, quota_out, 
cfg_file_p1);
-
-  GNUNET_CONFIGURATION_write(cfg, fname);
+  GNUNET_CONFIGURATION_set_value_number(cfg, "core", "TOTAL_QUOTA_IN", 
quota_in);
+  GNUNET_CONFIGURATION_set_value_number(cfg, "ats", "TOTAL_QUOTA_IN", 
quota_in);
+  GNUNET_CONFIGURATION_set_value_number(cfg, "ats", "TOTAL_QUOTA_OUT", 
quota_out);
+  GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_write(cfg, fname));
   GNUNET_CONFIGURATION_destroy(cfg);
-
   return fname;
 }
 
@@ -551,7 +550,7 @@
 {
   static char *argv[] = { "test_transport-quota-compliance",
     "-c",
-    "test_transport_api_data.conf",
+    "",
 #if VERBOSE
     "-L", "DEBUG",
 #endif

Modified: gnunet/src/transport/test_quota_compliance_unix_asymmetric_peer1.conf
===================================================================
--- gnunet/src/transport/test_quota_compliance_unix_asymmetric_peer1.conf       
2011-10-17 12:54:45 UTC (rev 17545)
+++ gnunet/src/transport/test_quota_compliance_unix_asymmetric_peer1.conf       
2011-10-17 13:28:27 UTC (rev 17546)
@@ -1,7 +1,7 @@
 @INLINE@ template_cfg_peer1.conf
 [PATHS]
 SERVICEHOME = /tmp/test_quota_compliance_peer1/
-DEFAULTCONFIG = test_quota_compliance_unix_peer1.conf
+DEFAULTCONFIG = test_quota_compliance_unix_asymmetric_peer1.conf
 
 [arm]
 PORT = 4087
@@ -24,5 +24,6 @@
 PLUGINS = unix
 UNIXPATH = /tmp/test_quota_compliance_unix_transport_peer1.sock
 
+[transport-unix]
+PORT = 4092
 
-

Modified: gnunet/src/transport/test_quota_compliance_unix_asymmetric_peer2.conf
===================================================================
--- gnunet/src/transport/test_quota_compliance_unix_asymmetric_peer2.conf       
2011-10-17 12:54:45 UTC (rev 17545)
+++ gnunet/src/transport/test_quota_compliance_unix_asymmetric_peer2.conf       
2011-10-17 13:28:27 UTC (rev 17546)
@@ -1,7 +1,7 @@
 @INLINE@ template_cfg_peer1.conf
 [PATHS]
 SERVICEHOME = /tmp/test_quota_compliance_peer2
-DEFAULTCONFIG = test_quota_compliance_unix_peer2.conf
+DEFAULTCONFIG = test_quota_compliance_unix_asymmetric_peer2.conf
 
 [arm]
 PORT = 3087

Modified: gnunet/src/transport/test_quota_compliance_unix_peer1.conf
===================================================================
--- gnunet/src/transport/test_quota_compliance_unix_peer1.conf  2011-10-17 
12:54:45 UTC (rev 17545)
+++ gnunet/src/transport/test_quota_compliance_unix_peer1.conf  2011-10-17 
13:28:27 UTC (rev 17546)
@@ -3,6 +3,9 @@
 SERVICEHOME = /tmp/test_quota_compliance_peer1/
 DEFAULTCONFIG = test_quota_compliance_unix_peer1.conf
 
+[transport-unix]
+PORT = 12120
+
 [arm]
 PORT = 4087
 UNIXPATH = /tmp/test_quota_compliance_unix_arm_peer1.sock
@@ -23,6 +26,3 @@
 PORT = 4091
 PLUGINS = unix
 UNIXPATH = /tmp/test_quota_compliance_unix_transport_peer1.sock
-
-
-

Modified: gnunet/src/transport/test_quota_compliance_unix_peer2.conf
===================================================================
--- gnunet/src/transport/test_quota_compliance_unix_peer2.conf  2011-10-17 
12:54:45 UTC (rev 17545)
+++ gnunet/src/transport/test_quota_compliance_unix_peer2.conf  2011-10-17 
13:28:27 UTC (rev 17546)
@@ -3,6 +3,9 @@
 SERVICEHOME = /tmp/test_quota_compliance_peer2
 DEFAULTCONFIG = test_quota_compliance_unix_peer2.conf
 
+[transport-unix]
+PORT = 12136
+
 [arm]
 PORT = 3087
 UNIXPATH = /tmp/test_quota_compliance_unix_arm_peer2.sock

Modified: gnunet/src/transport/test_transport_api_unix_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_unix_peer2.conf     2011-10-17 
12:54:45 UTC (rev 17545)
+++ gnunet/src/transport/test_transport_api_unix_peer2.conf     2011-10-17 
13:28:27 UTC (rev 17546)
@@ -25,5 +25,5 @@
 UNIXPATH = /tmp/gnunet-p2-service-transport.sock
 
 [transport-unix]
-PORT = 12131
+PORT = 12136
 




reply via email to

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