[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r16041 - in gnunet: contrib src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r16041 - in gnunet: contrib src/transport |
Date: |
Sat, 16 Jul 2011 22:30:22 +0200 |
Author: grothoff
Date: 2011-07-16 22:30:22 +0200 (Sat, 16 Jul 2011)
New Revision: 16041
Modified:
gnunet/contrib/defaults.conf
gnunet/src/transport/gnunet-service-transport.c
Log:
fix ats config
Modified: gnunet/contrib/defaults.conf
===================================================================
--- gnunet/contrib/defaults.conf 2011-07-16 20:21:27 UTC (rev 16040)
+++ gnunet/contrib/defaults.conf 2011-07-16 20:30:22 UTC (rev 16041)
@@ -86,9 +86,19 @@
# ACCEPT_FROM6 =
# REJECT_FROM =
# REJECT_FROM6 =
-# BINDTO =
+# BINDTO =
+# ATS options
+DUMP_MLP = NO
+DUMP_SOLUTION = NO
+DUMP_OVERWRITE = NO
+DUMP_MIN_PEERS = 0
+DUMP_MIN_ADDRS = 0
+DUMP_OVERWRITE = 0
+ATS_MIN_INTERVAL = 15000
+ATS_EXEC_INTERVAL = 30000
+
[transport-udp]
PORT = 2086
Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c 2011-07-16 20:21:27 UTC
(rev 16040)
+++ gnunet/src/transport/gnunet-service-transport.c 2011-07-16 20:30:22 UTC
(rev 16041)
@@ -6719,59 +6719,43 @@
int minimum_peers = 0;
int minimum_addresses = 0;
- if (GNUNET_CONFIGURATION_have_value(cfg, "transport", "DUMP_MLP"))
- log_problem = GNUNET_CONFIGURATION_get_value_yesno (cfg,
- "transport","DUMP_MLP");
-
- if (GNUNET_CONFIGURATION_have_value(cfg, "transport", "DUMP_SOLUTION"))
- log_solution = GNUNET_CONFIGURATION_get_value_yesno (cfg,
- "transport","DUMP_SOLUTION");
- if (GNUNET_CONFIGURATION_have_value(cfg, "transport", "DUMP_OVERWRITE"))
- overwrite_dump = GNUNET_CONFIGURATION_get_value_yesno (cfg,
- "transport","DUMP_OVERWRITE");
- if (GNUNET_CONFIGURATION_have_value(cfg, "transport", "DUMP_MIN_PEERS"))
- {
- GNUNET_CONFIGURATION_get_value_number(cfg,
- "transport","DUMP_MIN_PEERS", &value);
- minimum_peers = value;
- }
- if (GNUNET_CONFIGURATION_have_value(cfg,
- "transport", "DUMP_MIN_ADDRS"))
- {
+ log_problem = GNUNET_CONFIGURATION_get_value_yesno (cfg,
+ "transport",
+ "DUMP_MLP");
+ log_solution = GNUNET_CONFIGURATION_get_value_yesno (cfg,
+ "transport",
+ "DUMP_SOLUTION");
+ overwrite_dump = GNUNET_CONFIGURATION_get_value_yesno (cfg,
+ "transport",
+ "DUMP_OVERWRITE");
+ if (GNUNET_OK ==
GNUNET_CONFIGURATION_get_value_number(cfg,
- "transport","DUMP_MIN_ADDRS", &value);
- minimum_addresses= value;
- }
- if (GNUNET_CONFIGURATION_have_value(cfg,
- "transport", "DUMP_OVERWRITE"))
- {
+ "transport",
+ "DUMP_MIN_PEERS",
+ &value))
+ minimum_peers = (int) value;
+ if (GNUNET_OK ==
GNUNET_CONFIGURATION_get_value_number(cfg,
- "transport","DUMP_OVERWRITE", &value);
- overwrite_dump = value;
- }
-
- if (GNUNET_CONFIGURATION_have_value(cfg,
- "transport", "ATS_MIN_INTERVAL"))
- {
+ "transport",
+ "DUMP_MIN_ADDRS",
+ &value))
+ minimum_addresses = (int) value;
+ if (GNUNET_OK ==
GNUNET_CONFIGURATION_get_value_number(cfg,
- "transport","ATS_MIN_INTERVAL", &value);
- ats_minimum_interval.rel_value = value;
- }
-
- if (GNUNET_CONFIGURATION_have_value(cfg,
- "transport", "ATS_EXEC_INTERVAL"))
- {
- GNUNET_CONFIGURATION_get_value_number(cfg,
- "transport","ATS_EXEC_INTERVAL", &value);
- ats_regular_interval.rel_value = value;
- }
- if (GNUNET_CONFIGURATION_have_value(cfg, "transport", "ATS_MIN_INTERVAL"))
- {
- GNUNET_CONFIGURATION_get_value_number(cfg,
- "transport","ATS_MIN_INTERVAL", &value);
- ats_minimum_interval.rel_value = value;
- }
-
+ "transport",
+ "DUMP_OVERWRITE",
+ &value))
+ overwrite_dump = (int) value;
+ GNUNET_break (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_time (cfg,
+ "transport",
+ "ATS_EXEC_INTERVAL",
+ &ats_regular_interval));
+ GNUNET_break (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_time (cfg,
+ "transport",
+ "ATS_MIN_INTERVAL",
+ &ats_minimum_interval));
ats_set_logging_options (ats,
minimum_addresses,
minimum_peers,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r16041 - in gnunet: contrib src/transport,
gnunet <=