diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-05-06 12:59:09 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-05-06 12:59:09 +0000 |
commit | c12692b966d6e98b564940d72469a8dd1348a77d (patch) | |
tree | 7151a8ef0758f30bc67c64f6b14d44abd9bb8440 /src/ats | |
parent | c29bb29f2be760d1fe4fa156a71b99a3bd277fd6 (diff) | |
download | gnunet-c12692b966d6e98b564940d72469a8dd1348a77d.tar.gz gnunet-c12692b966d6e98b564940d72469a8dd1348a77d.zip |
-eliminating legacy defines
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/ats_api_scheduling.c | 19 | ||||
-rw-r--r-- | src/ats/perf_ats_mlp.c | 7 | ||||
-rw-r--r-- | src/ats/test_ats_api_bandwidth_consumption.c | 11 | ||||
-rw-r--r-- | src/ats/test_ats_api_scheduling.c | 11 | ||||
-rw-r--r-- | src/ats/test_ats_api_update_address.c | 8 | ||||
-rw-r--r-- | src/ats/test_ats_mlp.c | 7 | ||||
-rw-r--r-- | src/ats/test_ats_mlp_averaging.c | 7 |
7 files changed, 2 insertions, 68 deletions
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index eef0fa922..3c98b238c 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c | |||
@@ -847,25 +847,6 @@ GNUNET_ATS_address_get_type (struct GNUNET_ATS_SchedulingHandle * sh, const stru | |||
847 | /* no local network found for this address, default: WAN */ | 847 | /* no local network found for this address, default: WAN */ |
848 | if (type == GNUNET_ATS_NET_UNSPECIFIED) | 848 | if (type == GNUNET_ATS_NET_UNSPECIFIED) |
849 | type = GNUNET_ATS_NET_WAN; | 849 | type = GNUNET_ATS_NET_WAN; |
850 | |||
851 | #if VERBOSE | ||
852 | const char * range; | ||
853 | switch (type) { | ||
854 | case GNUNET_ATS_NET_WAN: | ||
855 | range = "WAN"; | ||
856 | break; | ||
857 | case GNUNET_ATS_NET_LAN: | ||
858 | range = "LAN"; | ||
859 | break; | ||
860 | case GNUNET_ATS_NET_LOOPBACK: | ||
861 | range = "LOOPBACK"; | ||
862 | break; | ||
863 | default: | ||
864 | |||
865 | break; | ||
866 | } | ||
867 | #endif | ||
868 | |||
869 | ats.type = htonl (GNUNET_ATS_NETWORK_TYPE); | 850 | ats.type = htonl (GNUNET_ATS_NETWORK_TYPE); |
870 | ats.value = htonl (type); | 851 | ats.value = htonl (type); |
871 | return (const struct GNUNET_ATS_Information) ats; | 852 | return (const struct GNUNET_ATS_Information) ats; |
diff --git a/src/ats/perf_ats_mlp.c b/src/ats/perf_ats_mlp.c index 0692f1594..a06f16c3e 100644 --- a/src/ats/perf_ats_mlp.c +++ b/src/ats/perf_ats_mlp.c | |||
@@ -29,9 +29,6 @@ | |||
29 | #include "gnunet_statistics_service.h" | 29 | #include "gnunet_statistics_service.h" |
30 | #include "gnunet-service-ats_addresses_mlp.h" | 30 | #include "gnunet-service-ats_addresses_mlp.h" |
31 | 31 | ||
32 | #define VERBOSE GNUNET_YES | ||
33 | #define VERBOSE_ARM GNUNET_NO | ||
34 | |||
35 | #define MLP_MAX_EXEC_DURATION GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3) | 32 | #define MLP_MAX_EXEC_DURATION GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3) |
36 | #define MLP_MAX_ITERATIONS INT_MAX | 33 | #define MLP_MAX_ITERATIONS INT_MAX |
37 | 34 | ||
@@ -54,9 +51,9 @@ struct ATS_Address *a; | |||
54 | 51 | ||
55 | static int ret; | 52 | static int ret; |
56 | 53 | ||
57 | struct GNUNET_CONTAINER_MultiHashMap * amap; | 54 | static struct GNUNET_CONTAINER_MultiHashMap * amap; |
58 | 55 | ||
59 | struct GAS_MLP_Handle *mlp; | 56 | static struct GAS_MLP_Handle *mlp; |
60 | 57 | ||
61 | 58 | ||
62 | 59 | ||
diff --git a/src/ats/test_ats_api_bandwidth_consumption.c b/src/ats/test_ats_api_bandwidth_consumption.c index a84927d58..c28364713 100644 --- a/src/ats/test_ats_api_bandwidth_consumption.c +++ b/src/ats/test_ats_api_bandwidth_consumption.c | |||
@@ -28,10 +28,6 @@ | |||
28 | #include "gnunet_ats_service.h" | 28 | #include "gnunet_ats_service.h" |
29 | #include "ats.h" | 29 | #include "ats.h" |
30 | 30 | ||
31 | #define VERBOSE GNUNET_NO | ||
32 | |||
33 | #define VERBOSE_ARM GNUNET_NO | ||
34 | |||
35 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) | 31 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) |
36 | 32 | ||
37 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 33 | static GNUNET_SCHEDULER_TaskIdentifier die_task; |
@@ -201,9 +197,6 @@ start_arm (const char *cfgname) | |||
201 | arm_proc = | 197 | arm_proc = |
202 | GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm", | 198 | GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm", |
203 | "gnunet-service-arm", | 199 | "gnunet-service-arm", |
204 | #if VERBOSE_ARM | ||
205 | "-L", "DEBUG", | ||
206 | #endif | ||
207 | "-c", cfgname, NULL); | 200 | "-c", cfgname, NULL); |
208 | } | 201 | } |
209 | 202 | ||
@@ -263,11 +256,7 @@ main (int argc, char *argv[]) | |||
263 | static char *const argv2[] = { "test_ats_api_bandwidth_consumption", | 256 | static char *const argv2[] = { "test_ats_api_bandwidth_consumption", |
264 | "-c", | 257 | "-c", |
265 | "test_ats_api.conf", | 258 | "test_ats_api.conf", |
266 | #if VERBOSE | ||
267 | "-L", "DEBUG", | ||
268 | #else | ||
269 | "-L", "WARNING", | 259 | "-L", "WARNING", |
270 | #endif | ||
271 | NULL | 260 | NULL |
272 | }; | 261 | }; |
273 | 262 | ||
diff --git a/src/ats/test_ats_api_scheduling.c b/src/ats/test_ats_api_scheduling.c index 892186cd1..686916597 100644 --- a/src/ats/test_ats_api_scheduling.c +++ b/src/ats/test_ats_api_scheduling.c | |||
@@ -34,10 +34,6 @@ | |||
34 | #include "gnunet_ats_service.h" | 34 | #include "gnunet_ats_service.h" |
35 | #include "ats.h" | 35 | #include "ats.h" |
36 | 36 | ||
37 | #define VERBOSE GNUNET_NO | ||
38 | |||
39 | #define VERBOSE_ARM GNUNET_NO | ||
40 | |||
41 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) | 37 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) |
42 | 38 | ||
43 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 39 | static GNUNET_SCHEDULER_TaskIdentifier die_task; |
@@ -158,9 +154,6 @@ start_arm (const char *cfgname) | |||
158 | arm_proc = | 154 | arm_proc = |
159 | GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm", | 155 | GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm", |
160 | "gnunet-service-arm", | 156 | "gnunet-service-arm", |
161 | #if VERBOSE_ARM | ||
162 | "-L", "DEBUG", | ||
163 | #endif | ||
164 | "-c", cfgname, NULL); | 157 | "-c", cfgname, NULL); |
165 | } | 158 | } |
166 | 159 | ||
@@ -241,11 +234,7 @@ main (int argc, char *argv[]) | |||
241 | static char *const argv2[] = { "test_ats_api_scheduling", | 234 | static char *const argv2[] = { "test_ats_api_scheduling", |
242 | "-c", | 235 | "-c", |
243 | "test_ats_api.conf", | 236 | "test_ats_api.conf", |
244 | #if VERBOSE | ||
245 | "-L", "DEBUG", | ||
246 | #else | ||
247 | "-L", "WARNING", | 237 | "-L", "WARNING", |
248 | #endif | ||
249 | NULL | 238 | NULL |
250 | }; | 239 | }; |
251 | 240 | ||
diff --git a/src/ats/test_ats_api_update_address.c b/src/ats/test_ats_api_update_address.c index 2607f536e..19585903f 100644 --- a/src/ats/test_ats_api_update_address.c +++ b/src/ats/test_ats_api_update_address.c | |||
@@ -34,10 +34,6 @@ | |||
34 | #include "gnunet_ats_service.h" | 34 | #include "gnunet_ats_service.h" |
35 | #include "gnunet_transport_service.h" | 35 | #include "gnunet_transport_service.h" |
36 | 36 | ||
37 | #define VERBOSE GNUNET_NO | ||
38 | |||
39 | #define VERBOSE_ARM GNUNET_NO | ||
40 | |||
41 | #define START_ARM GNUNET_YES | 37 | #define START_ARM GNUNET_YES |
42 | 38 | ||
43 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | 39 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
@@ -277,11 +273,7 @@ main (int argc, char *argv1[]) | |||
277 | static char *const argv[] = { "test_ats_api_update_address", | 273 | static char *const argv[] = { "test_ats_api_update_address", |
278 | "-c", | 274 | "-c", |
279 | "test_ats_api.conf", | 275 | "test_ats_api.conf", |
280 | #if VERBOSE | ||
281 | "-L", "DEBUG", | ||
282 | #else | ||
283 | "-L", "WARNING", | 276 | "-L", "WARNING", |
284 | #endif | ||
285 | NULL | 277 | NULL |
286 | }; | 278 | }; |
287 | 279 | ||
diff --git a/src/ats/test_ats_mlp.c b/src/ats/test_ats_mlp.c index 27e5360b3..c4672103d 100644 --- a/src/ats/test_ats_mlp.c +++ b/src/ats/test_ats_mlp.c | |||
@@ -30,9 +30,6 @@ | |||
30 | #include "gnunet_ats_service.h" | 30 | #include "gnunet_ats_service.h" |
31 | #include "gnunet-service-ats_addresses_mlp.h" | 31 | #include "gnunet-service-ats_addresses_mlp.h" |
32 | 32 | ||
33 | #define VERBOSE GNUNET_YES | ||
34 | #define VERBOSE_ARM GNUNET_NO | ||
35 | |||
36 | #define MLP_MAX_EXEC_DURATION GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3) | 33 | #define MLP_MAX_EXEC_DURATION GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3) |
37 | #define MLP_MAX_ITERATIONS INT_MAX | 34 | #define MLP_MAX_ITERATIONS INT_MAX |
38 | 35 | ||
@@ -179,11 +176,7 @@ main (int argc, char *argv[]) | |||
179 | static char *const argv2[] = { "test_ats_mlp", | 176 | static char *const argv2[] = { "test_ats_mlp", |
180 | "-c", | 177 | "-c", |
181 | "test_ats_api.conf", | 178 | "test_ats_api.conf", |
182 | #if VERBOSE | ||
183 | "-L", "DEBUG", | ||
184 | #else | ||
185 | "-L", "WARNING", | 179 | "-L", "WARNING", |
186 | #endif | ||
187 | NULL | 180 | NULL |
188 | }; | 181 | }; |
189 | 182 | ||
diff --git a/src/ats/test_ats_mlp_averaging.c b/src/ats/test_ats_mlp_averaging.c index 5eea44631..97e9aa722 100644 --- a/src/ats/test_ats_mlp_averaging.c +++ b/src/ats/test_ats_mlp_averaging.c | |||
@@ -30,9 +30,6 @@ | |||
30 | #include "gnunet_ats_service.h" | 30 | #include "gnunet_ats_service.h" |
31 | #include "gnunet-service-ats_addresses_mlp.h" | 31 | #include "gnunet-service-ats_addresses_mlp.h" |
32 | 32 | ||
33 | #define VERBOSE GNUNET_YES | ||
34 | #define VERBOSE_ARM GNUNET_NO | ||
35 | |||
36 | #define MLP_MAX_EXEC_DURATION GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3) | 33 | #define MLP_MAX_EXEC_DURATION GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3) |
37 | #define MLP_MAX_ITERATIONS INT_MAX | 34 | #define MLP_MAX_ITERATIONS INT_MAX |
38 | 35 | ||
@@ -162,11 +159,7 @@ main (int argc, char *argv[]) | |||
162 | static char *const argv2[] = { "test_ats_mlp", | 159 | static char *const argv2[] = { "test_ats_mlp", |
163 | "-c", | 160 | "-c", |
164 | "test_ats_api.conf", | 161 | "test_ats_api.conf", |
165 | #if VERBOSE | ||
166 | "-L", "DEBUG", | ||
167 | #else | ||
168 | "-L", "WARNING", | 162 | "-L", "WARNING", |
169 | #endif | ||
170 | NULL | 163 | NULL |
171 | }; | 164 | }; |
172 | 165 | ||