diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-11-04 21:01:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-11-04 21:01:22 +0000 |
commit | 0e4c7cdccfc4105f9c6e529cfa0e3722104b0ddf (patch) | |
tree | ac53b9088e75b7041e14e3455698a75da085b3d7 /src | |
parent | b6d09b511fbd61d3b36fde4c28624bed321bf4a1 (diff) | |
download | gnunet-0e4c7cdccfc4105f9c6e529cfa0e3722104b0ddf.tar.gz gnunet-0e4c7cdccfc4105f9c6e529cfa0e3722104b0ddf.zip |
-misc bugfixes, travel hacking
Diffstat (limited to 'src')
130 files changed, 342 insertions, 742 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index c155577d0..49315687f 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -450,9 +450,10 @@ main (int argc, char *const *argv) | |||
450 | ("Control services and the Automated Restart Manager (ARM)"), | 450 | ("Control services and the Automated Restart Manager (ARM)"), |
451 | options, &run, NULL)) | 451 | options, &run, NULL)) |
452 | { | 452 | { |
453 | GNUNET_free ((void *) argv); | ||
453 | return ret; | 454 | return ret; |
454 | } | 455 | } |
455 | 456 | GNUNET_free ((void*) argv); | |
456 | return 1; | 457 | return 1; |
457 | } | 458 | } |
458 | 459 | ||
diff --git a/src/arm/test_arm_api_data.conf b/src/arm/test_arm_api_data.conf index cbadc47d2..8ebd6976c 100644 --- a/src/arm/test_arm_api_data.conf +++ b/src/arm/test_arm_api_data.conf | |||
@@ -6,16 +6,13 @@ PORT = 23354 | |||
6 | DEFAULTSERVICES = | 6 | DEFAULTSERVICES = |
7 | BINARY = gnunet-service-arm | 7 | BINARY = gnunet-service-arm |
8 | OPTIONS = -L ERROR | 8 | OPTIONS = -L ERROR |
9 | # DEBUG = YES | ||
10 | #PREFIX = valgrind --tool=memcheck --leak-check=yes | 9 | #PREFIX = valgrind --tool=memcheck --leak-check=yes |
11 | 10 | ||
12 | [resolver] | 11 | [resolver] |
13 | # DEBUG = YES | ||
14 | PORT = 23355 | 12 | PORT = 23355 |
15 | # PREFIX = valgrind | 13 | # PREFIX = valgrind |
16 | 14 | ||
17 | [do-nothing] | 15 | [do-nothing] |
18 | #DEBUG = YES | ||
19 | AUTOSTART = NO | 16 | AUTOSTART = NO |
20 | PORT = 2223 | 17 | PORT = 2223 |
21 | HOSTNAME = localhost | 18 | HOSTNAME = localhost |
@@ -42,7 +39,6 @@ AUTOSTART = NO | |||
42 | 39 | ||
43 | [statistics] | 40 | [statistics] |
44 | AUTOSTART = YES | 41 | AUTOSTART = YES |
45 | # DEBUG = NO | ||
46 | 42 | ||
47 | 43 | ||
48 | [dns] | 44 | [dns] |
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c index 1709dbdba..34ebad164 100644 --- a/src/arm/test_exponential_backoff.c +++ b/src/arm/test_exponential_backoff.c | |||
@@ -28,8 +28,6 @@ | |||
28 | #include "gnunet_program_lib.h" | 28 | #include "gnunet_program_lib.h" |
29 | #include "gnunet_protocols.h" | 29 | #include "gnunet_protocols.h" |
30 | 30 | ||
31 | #define VERBOSE GNUNET_NO | ||
32 | |||
33 | #define START_ARM GNUNET_YES | 31 | #define START_ARM GNUNET_YES |
34 | 32 | ||
35 | #define LOG_BACKOFF GNUNET_NO | 33 | #define LOG_BACKOFF GNUNET_NO |
@@ -115,9 +113,7 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
115 | 113 | ||
116 | if (msg == NULL) | 114 | if (msg == NULL) |
117 | { | 115 | { |
118 | #if VERBOSE | ||
119 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service shutdown complete.\n"); | 116 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service shutdown complete.\n"); |
120 | #endif | ||
121 | if (shutdown_ctx->cont != NULL) | 117 | if (shutdown_ctx->cont != NULL) |
122 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_NO); | 118 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_NO); |
123 | 119 | ||
@@ -131,10 +127,8 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
131 | switch (ntohs (msg->type)) | 127 | switch (ntohs (msg->type)) |
132 | { | 128 | { |
133 | case GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN: | 129 | case GNUNET_MESSAGE_TYPE_ARM_SHUTDOWN: |
134 | #if VERBOSE | ||
135 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 130 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
136 | "Received confirmation for service shutdown.\n"); | 131 | "Received confirmation for service shutdown.\n"); |
137 | #endif | ||
138 | shutdown_ctx->confirmed = GNUNET_YES; | 132 | shutdown_ctx->confirmed = GNUNET_YES; |
139 | GNUNET_CLIENT_receive (shutdown_ctx->sock, | 133 | GNUNET_CLIENT_receive (shutdown_ctx->sock, |
140 | &service_shutdown_handler, shutdown_ctx, | 134 | &service_shutdown_handler, shutdown_ctx, |
@@ -379,9 +373,6 @@ check () | |||
379 | char *const argv[] = { | 373 | char *const argv[] = { |
380 | "test-exponential-backoff", | 374 | "test-exponential-backoff", |
381 | "-c", "test_arm_api_data.conf", | 375 | "-c", "test_arm_api_data.conf", |
382 | #if VERBOSE | ||
383 | "-L", "DEBUG", | ||
384 | #endif | ||
385 | NULL | 376 | NULL |
386 | }; | 377 | }; |
387 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 378 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
@@ -431,11 +422,7 @@ main (int argc, char *argv[]) | |||
431 | int ret; | 422 | int ret; |
432 | 423 | ||
433 | GNUNET_log_setup ("test-exponential-backoff", | 424 | GNUNET_log_setup ("test-exponential-backoff", |
434 | #if VERBOSE | ||
435 | "DEBUG", | ||
436 | #else | ||
437 | "WARNING", | 425 | "WARNING", |
438 | #endif | ||
439 | NULL); | 426 | NULL); |
440 | 427 | ||
441 | init (); | 428 | init (); |
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c index ff4222780..c471a70f9 100644 --- a/src/ats/gnunet-service-ats_addresses.c +++ b/src/ats/gnunet-service-ats_addresses.c | |||
@@ -35,8 +35,6 @@ | |||
35 | #include "gnunet-service-ats_addresses_mlp.h" | 35 | #include "gnunet-service-ats_addresses_mlp.h" |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #define VERBOSE GNUNET_NO | ||
39 | |||
40 | #define ATS_BLOCKING_DELTA GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 100) | 38 | #define ATS_BLOCKING_DELTA GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 100) |
41 | 39 | ||
42 | enum ATS_Mode | 40 | enum ATS_Mode |
@@ -356,6 +354,8 @@ lookup_address (const struct GNUNET_PeerIdentity *peer, | |||
356 | return old; | 354 | return old; |
357 | } | 355 | } |
358 | 356 | ||
357 | |||
358 | #if DEADCODE | ||
359 | static int | 359 | static int |
360 | compare_address_session_it (void *cls, const struct GNUNET_HashCode * key, void *value) | 360 | compare_address_session_it (void *cls, const struct GNUNET_HashCode * key, void *value) |
361 | { | 361 | { |
@@ -383,7 +383,7 @@ compare_address_session_it (void *cls, const struct GNUNET_HashCode * key, void | |||
383 | * @param addr existing address record | 383 | * @param addr existing address record |
384 | * @return existing address record, NULL for none | 384 | * @return existing address record, NULL for none |
385 | */ | 385 | */ |
386 | struct ATS_Address * | 386 | static struct ATS_Address * |
387 | find_exact_address (const struct GNUNET_PeerIdentity *peer, | 387 | find_exact_address (const struct GNUNET_PeerIdentity *peer, |
388 | const struct ATS_Address *addr) | 388 | const struct ATS_Address *addr) |
389 | { | 389 | { |
@@ -395,6 +395,7 @@ find_exact_address (const struct GNUNET_PeerIdentity *peer, | |||
395 | &compare_address_session_it, &cac); | 395 | &compare_address_session_it, &cac); |
396 | return cac.exact_address; | 396 | return cac.exact_address; |
397 | } | 397 | } |
398 | #endif | ||
398 | 399 | ||
399 | 400 | ||
400 | void | 401 | void |
@@ -569,11 +570,9 @@ destroy_by_session_id (void *cls, const struct GNUNET_HashCode * key, void *valu | |||
569 | if (aa->session_id != 0) | 570 | if (aa->session_id != 0) |
570 | GNUNET_break (0 == strcmp (info->plugin, aa->plugin)); | 571 | GNUNET_break (0 == strcmp (info->plugin, aa->plugin)); |
571 | /* session died */ | 572 | /* session died */ |
572 | #if VERBOSE | ||
573 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 573 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
574 | "Deleting session for peer `%s': `%s' %u\n", | 574 | "Deleting session for peer `%s': `%s' %u\n", |
575 | GNUNET_i2s (&aa->peer), aa->plugin, aa->session_id); | 575 | GNUNET_i2s (&aa->peer), aa->plugin, aa->session_id); |
576 | #endif | ||
577 | aa->session_id = 0; | 576 | aa->session_id = 0; |
578 | 577 | ||
579 | if (GNUNET_YES == aa->active) | 578 | if (GNUNET_YES == aa->active) |
@@ -586,11 +585,9 @@ destroy_by_session_id (void *cls, const struct GNUNET_HashCode * key, void *valu | |||
586 | /* session == 0 and addrlen == 0 : destroy address */ | 585 | /* session == 0 and addrlen == 0 : destroy address */ |
587 | if (aa->addr_len == 0) | 586 | if (aa->addr_len == 0) |
588 | { | 587 | { |
589 | #if VERBOSE | ||
590 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 588 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
591 | "Deleting session and address for peer `%s': `%s' %u\n", | 589 | "Deleting session and address for peer `%s': `%s' %u\n", |
592 | GNUNET_i2s (&aa->peer), aa->plugin, aa->session_id); | 590 | GNUNET_i2s (&aa->peer), aa->plugin, aa->session_id); |
593 | #endif | ||
594 | (void) destroy_address (aa); | 591 | (void) destroy_address (aa); |
595 | } | 592 | } |
596 | else | 593 | else |
@@ -605,6 +602,7 @@ destroy_by_session_id (void *cls, const struct GNUNET_HashCode * key, void *valu | |||
605 | return GNUNET_OK; | 602 | return GNUNET_OK; |
606 | } | 603 | } |
607 | 604 | ||
605 | |||
608 | void | 606 | void |
609 | GAS_addresses_destroy (const struct GNUNET_PeerIdentity *peer, | 607 | GAS_addresses_destroy (const struct GNUNET_PeerIdentity *peer, |
610 | const char *plugin_name, const void *plugin_addr, | 608 | const char *plugin_name, const void *plugin_addr, |
@@ -773,7 +771,8 @@ GAS_addresses_in_use (const struct GNUNET_PeerIdentity *peer, | |||
773 | } | 771 | } |
774 | 772 | ||
775 | 773 | ||
776 | void request_address_mlp (const struct GNUNET_PeerIdentity *peer) | 774 | static void |
775 | request_address_mlp (const struct GNUNET_PeerIdentity *peer) | ||
777 | { | 776 | { |
778 | struct ATS_Address *aa; | 777 | struct ATS_Address *aa; |
779 | aa = NULL; | 778 | aa = NULL; |
@@ -815,7 +814,9 @@ void request_address_mlp (const struct GNUNET_PeerIdentity *peer) | |||
815 | 814 | ||
816 | } | 815 | } |
817 | 816 | ||
818 | void request_address_simple (const struct GNUNET_PeerIdentity *peer) | 817 | |
818 | static void | ||
819 | request_address_simple (const struct GNUNET_PeerIdentity *peer) | ||
819 | { | 820 | { |
820 | struct ATS_Address *aa; | 821 | struct ATS_Address *aa; |
821 | aa = NULL; | 822 | aa = NULL; |
@@ -884,6 +885,7 @@ reset_address_it (void *cls, const struct GNUNET_HashCode * key, void *value) | |||
884 | return GNUNET_OK; | 885 | return GNUNET_OK; |
885 | } | 886 | } |
886 | 887 | ||
888 | |||
887 | void | 889 | void |
888 | GAS_addresses_handle_backoff_reset (const struct GNUNET_PeerIdentity *peer) | 890 | GAS_addresses_handle_backoff_reset (const struct GNUNET_PeerIdentity *peer) |
889 | { | 891 | { |
@@ -1112,9 +1114,11 @@ struct PeerInfoIteratorContext | |||
1112 | void *it_cls; | 1114 | void *it_cls; |
1113 | }; | 1115 | }; |
1114 | 1116 | ||
1115 | int peerinfo_it (void *cls, | 1117 | |
1116 | const struct GNUNET_HashCode * key, | 1118 | static int |
1117 | void *value) | 1119 | peerinfo_it (void *cls, |
1120 | const struct GNUNET_HashCode * key, | ||
1121 | void *value) | ||
1118 | { | 1122 | { |
1119 | struct PeerInfoIteratorContext *pi_ctx = cls; | 1123 | struct PeerInfoIteratorContext *pi_ctx = cls; |
1120 | struct ATS_Address *addr = (struct ATS_Address *) value; | 1124 | struct ATS_Address *addr = (struct ATS_Address *) value; |
@@ -1130,6 +1134,7 @@ int peerinfo_it (void *cls, | |||
1130 | return GNUNET_YES; | 1134 | return GNUNET_YES; |
1131 | } | 1135 | } |
1132 | 1136 | ||
1137 | |||
1133 | /** | 1138 | /** |
1134 | * Return all peers currently known to ATS | 1139 | * Return all peers currently known to ATS |
1135 | * | 1140 | * |
diff --git a/src/ats/perf_ats_mlp.c b/src/ats/perf_ats_mlp.c index 51f910256..751fad51a 100644 --- a/src/ats/perf_ats_mlp.c +++ b/src/ats/perf_ats_mlp.c | |||
@@ -366,8 +366,7 @@ main (int argc, char *const *argv) | |||
366 | GNUNET_PROGRAM_run (argc, argv, | 366 | GNUNET_PROGRAM_run (argc, argv, |
367 | "perf_ats_mlp", "nohelp", options, | 367 | "perf_ats_mlp", "nohelp", options, |
368 | &check, NULL); | 368 | &check, NULL); |
369 | 369 | GNUNET_free ((void *) argv); | |
370 | |||
371 | return ret; | 370 | return ret; |
372 | } | 371 | } |
373 | 372 | ||
diff --git a/src/ats/test_ats_api.conf b/src/ats/test_ats_api.conf index ab96f655e..2ac499c66 100644 --- a/src/ats/test_ats_api.conf +++ b/src/ats/test_ats_api.conf | |||
@@ -7,7 +7,6 @@ DEFAULTSERVICES = ats | |||
7 | UNIXPATH = /tmp/test-ats-scheduling-arm.sock | 7 | UNIXPATH = /tmp/test-ats-scheduling-arm.sock |
8 | 8 | ||
9 | [ats] | 9 | [ats] |
10 | #DEBUG = YES | ||
11 | #PREFIX = valgrind --leak-check=full | 10 | #PREFIX = valgrind --leak-check=full |
12 | AUTOSTART = YES | 11 | AUTOSTART = YES |
13 | PORT = 12002 | 12 | PORT = 12002 |
diff --git a/src/ats/test_ats_api_update_address.c b/src/ats/test_ats_api_update_address.c index 12d283aac..6a9e33800 100644 --- a/src/ats/test_ats_api_update_address.c +++ b/src/ats/test_ats_api_update_address.c | |||
@@ -34,7 +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 START_ARM GNUNET_YES | ||
38 | 37 | ||
39 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | 38 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
40 | 39 | ||
diff --git a/src/chat/test_chat.c b/src/chat/test_chat.c index 24a1e38da..78b31f1b1 100644 --- a/src/chat/test_chat.c +++ b/src/chat/test_chat.c | |||
@@ -37,10 +37,6 @@ | |||
37 | #include "gnunet_arm_service.h" | 37 | #include "gnunet_arm_service.h" |
38 | #include "gnunet_chat_service.h" | 38 | #include "gnunet_chat_service.h" |
39 | 39 | ||
40 | #define VERBOSE GNUNET_NO | ||
41 | |||
42 | #define START_ARM GNUNET_YES | ||
43 | |||
44 | /** | 40 | /** |
45 | * How long until we give up on passing the test? | 41 | * How long until we give up on passing the test? |
46 | */ | 42 | */ |
@@ -49,9 +45,7 @@ | |||
49 | struct PeerContext | 45 | struct PeerContext |
50 | { | 46 | { |
51 | struct GNUNET_CONFIGURATION_Handle *cfg; | 47 | struct GNUNET_CONFIGURATION_Handle *cfg; |
52 | #if START_ARM | ||
53 | struct GNUNET_OS_Process *arm_proc; | 48 | struct GNUNET_OS_Process *arm_proc; |
54 | #endif | ||
55 | }; | 49 | }; |
56 | 50 | ||
57 | struct Wanted | 51 | struct Wanted |
@@ -120,12 +114,10 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
120 | 114 | ||
121 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 115 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
122 | p->cfg = GNUNET_CONFIGURATION_create (); | 116 | p->cfg = GNUNET_CONFIGURATION_create (); |
123 | #if START_ARM | ||
124 | p->arm_proc = | 117 | p->arm_proc = |
125 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, | 118 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, |
126 | "gnunet-service-arm", | 119 | "gnunet-service-arm", |
127 | "-c", cfgname, NULL); | 120 | "-c", cfgname, NULL); |
128 | #endif | ||
129 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 121 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
130 | GNUNET_free (binary); | 122 | GNUNET_free (binary); |
131 | } | 123 | } |
@@ -134,7 +126,6 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
134 | static void | 126 | static void |
135 | stop_arm (struct PeerContext *p) | 127 | stop_arm (struct PeerContext *p) |
136 | { | 128 | { |
137 | #if START_ARM | ||
138 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 129 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
139 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 130 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
140 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 131 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
@@ -143,7 +134,6 @@ stop_arm (struct PeerContext *p) | |||
143 | GNUNET_OS_process_get_pid (p->arm_proc)); | 134 | GNUNET_OS_process_get_pid (p->arm_proc)); |
144 | GNUNET_OS_process_destroy (p->arm_proc); | 135 | GNUNET_OS_process_destroy (p->arm_proc); |
145 | p->arm_proc = NULL; | 136 | p->arm_proc = NULL; |
146 | #endif | ||
147 | GNUNET_CONFIGURATION_destroy (p->cfg); | 137 | GNUNET_CONFIGURATION_destroy (p->cfg); |
148 | } | 138 | } |
149 | 139 | ||
@@ -168,9 +158,8 @@ abort_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
168 | static void | 158 | static void |
169 | timeout_kill (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 159 | timeout_kill (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
170 | { | 160 | { |
171 | #if VERBOSE | 161 | fprintf (stderr, |
172 | printf ("Timed out, stopping the test.\n"); | 162 | "Timed out, stopping the test.\n"); |
173 | #endif | ||
174 | kill_task = GNUNET_SCHEDULER_NO_TASK; | 163 | kill_task = GNUNET_SCHEDULER_NO_TASK; |
175 | if (wait_task != GNUNET_SCHEDULER_NO_TASK) | 164 | if (wait_task != GNUNET_SCHEDULER_NO_TASK) |
176 | { | 165 | { |
@@ -187,9 +176,8 @@ join_cb (void *cls) | |||
187 | { | 176 | { |
188 | struct Wanted *want = cls; | 177 | struct Wanted *want = cls; |
189 | 178 | ||
190 | #if VERBOSE | 179 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
191 | printf ("%s has joined\n", want->me); | 180 | "%s has joined\n", want->me); |
192 | #endif | ||
193 | if (NULL != want->next_task) | 181 | if (NULL != want->next_task) |
194 | GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls); | 182 | GNUNET_SCHEDULER_add_now (want->next_task, want->next_task_cls); |
195 | return GNUNET_OK; | 183 | return GNUNET_OK; |
@@ -204,13 +192,12 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info, | |||
204 | struct Wanted *want = cls; | 192 | struct Wanted *want = cls; |
205 | struct GNUNET_HashCode sender; | 193 | struct GNUNET_HashCode sender; |
206 | 194 | ||
207 | #if VERBOSE | 195 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
208 | printf ("%s - told that %s has %s\n", want->me, | 196 | "%s - told that %s has %s\n", want->me, |
209 | member_info == | 197 | member_info == |
210 | NULL ? NULL : GNUNET_CONTAINER_meta_data_get_by_type (member_info, | 198 | NULL ? NULL : GNUNET_CONTAINER_meta_data_get_by_type (member_info, |
211 | EXTRACTOR_METATYPE_TITLE), | 199 | EXTRACTOR_METATYPE_TITLE), |
212 | member_info == NULL ? "left" : "joined"); | 200 | member_info == NULL ? "left" : "joined"); |
213 | #endif | ||
214 | GNUNET_CRYPTO_hash (member_id, | 201 | GNUNET_CRYPTO_hash (member_id, |
215 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 202 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), |
216 | &sender); | 203 | &sender); |
@@ -242,12 +229,12 @@ receive_cb (void *cls, struct GNUNET_CHAT_Room *room, | |||
242 | { | 229 | { |
243 | struct Wanted *want = cls; | 230 | struct Wanted *want = cls; |
244 | 231 | ||
245 | #if VERBOSE | 232 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
246 | printf ("%s - told that %s said %s\n", want->me, | 233 | |
247 | meta == NULL ? NULL : GNUNET_CONTAINER_meta_data_get_by_type (meta, | 234 | "%s - told that %s said %s\n", want->me, |
248 | EXTRACTOR_METATYPE_TITLE), | 235 | meta == NULL ? NULL : GNUNET_CONTAINER_meta_data_get_by_type (meta, |
249 | message); | 236 | EXTRACTOR_METATYPE_TITLE), |
250 | #endif | 237 | message); |
251 | if ((0 == strcmp (message, want->msg)) && | 238 | if ((0 == strcmp (message, want->msg)) && |
252 | (((sender == NULL) && (want->sender == NULL)) || | 239 | (((sender == NULL) && (want->sender == NULL)) || |
253 | ((sender != NULL) && (want->sender != NULL) && | 240 | ((sender != NULL) && (want->sender != NULL) && |
@@ -280,12 +267,11 @@ confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room, | |||
280 | { | 267 | { |
281 | struct Wanted *want = cls; | 268 | struct Wanted *want = cls; |
282 | 269 | ||
283 | #if VERBOSE | 270 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
284 | printf ("%s - told that %s acknowledged message #%d\n", want->me, | 271 | "%s - told that %s acknowledged message #%d\n", want->me, |
285 | GNUNET_CONTAINER_meta_data_get_by_type (want->meta, | 272 | GNUNET_CONTAINER_meta_data_get_by_type (want->meta, |
286 | EXTRACTOR_METATYPE_TITLE), | 273 | EXTRACTOR_METATYPE_TITLE), |
287 | orig_seq_number); | 274 | orig_seq_number); |
288 | #endif | ||
289 | if ((0 == memcmp (receiver, want->sender, sizeof (struct GNUNET_HashCode))) && | 275 | if ((0 == memcmp (receiver, want->sender, sizeof (struct GNUNET_HashCode))) && |
290 | (orig_seq_number == want->sequence_number) && | 276 | (orig_seq_number == want->sequence_number) && |
291 | (timestamp.abs_value >= want->timestamp.abs_value)) | 277 | (timestamp.abs_value >= want->timestamp.abs_value)) |
@@ -308,9 +294,6 @@ wait_until_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
308 | { | 294 | { |
309 | GNUNET_SCHEDULER_Task task = cls; | 295 | GNUNET_SCHEDULER_Task task = cls; |
310 | 296 | ||
311 | #if VERBOSE | ||
312 | printf ("Waiting...\n"); | ||
313 | #endif | ||
314 | if (is_ready) | 297 | if (is_ready) |
315 | { | 298 | { |
316 | wait_task = GNUNET_SCHEDULER_NO_TASK; | 299 | wait_task = GNUNET_SCHEDULER_NO_TASK; |
@@ -327,9 +310,8 @@ wait_until_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
327 | static void | 310 | static void |
328 | disconnect_alice (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 311 | disconnect_alice (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
329 | { | 312 | { |
330 | #if VERBOSE | 313 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
331 | printf ("Alice is leaving.\n"); | 314 | "Alice is leaving.\n"); |
332 | #endif | ||
333 | if (is_p2p) | 315 | if (is_p2p) |
334 | stop_arm (&p2); | 316 | stop_arm (&p2); |
335 | GNUNET_CHAT_leave_room (alice_room); | 317 | GNUNET_CHAT_leave_room (alice_room); |
@@ -342,9 +324,8 @@ disconnect_alice (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
342 | static void | 324 | static void |
343 | disconnect_bob (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 325 | disconnect_bob (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
344 | { | 326 | { |
345 | #if VERBOSE | 327 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
346 | printf ("Bod is leaving.\n"); | 328 | "Bob is leaving.\n"); |
347 | #endif | ||
348 | alice_wanted.meta = NULL; | 329 | alice_wanted.meta = NULL; |
349 | alice_wanted.sender = &bob; | 330 | alice_wanted.sender = &bob; |
350 | alice_wanted.msg = NULL; | 331 | alice_wanted.msg = NULL; |
@@ -366,10 +347,8 @@ set_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
366 | static void | 347 | static void |
367 | send_to_alice (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 348 | send_to_alice (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
368 | { | 349 | { |
369 | #if VERBOSE | 350 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
370 | printf ("Bob says 'Hi!'\n"); | 351 | "Bob says 'Hi!'\n"); |
371 | #endif | ||
372 | |||
373 | alice_wanted.meta = bob_meta; | 352 | alice_wanted.meta = bob_meta; |
374 | alice_wanted.sender = &bob; | 353 | alice_wanted.sender = &bob; |
375 | alice_wanted.msg = "Hi Alice!"; | 354 | alice_wanted.msg = "Hi Alice!"; |
@@ -388,9 +367,8 @@ send_to_bob (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
388 | enum GNUNET_CHAT_MsgOptions options; | 367 | enum GNUNET_CHAT_MsgOptions options; |
389 | uint32_t *seq = NULL; | 368 | uint32_t *seq = NULL; |
390 | 369 | ||
391 | #if VERBOSE | 370 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
392 | printf ("Alice says 'Hi!'\n"); | 371 | "Alice says 'Hi!'\n"); |
393 | #endif | ||
394 | if (is_ackn) | 372 | if (is_ackn) |
395 | { | 373 | { |
396 | options = GNUNET_CHAT_MSG_ACKNOWLEDGED; | 374 | options = GNUNET_CHAT_MSG_ACKNOWLEDGED; |
@@ -449,9 +427,8 @@ prepare_for_alice_task (void *cls, | |||
449 | static void | 427 | static void |
450 | join_bob_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 428 | join_bob_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
451 | { | 429 | { |
452 | #if VERBOSE | 430 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
453 | printf ("Bob joining\n"); | 431 | "Bob joining\n"); |
454 | #endif | ||
455 | alice_wanted.meta = bob_meta; | 432 | alice_wanted.meta = bob_meta; |
456 | alice_wanted.sender = &bob; | 433 | alice_wanted.sender = &bob; |
457 | alice_wanted.msg = NULL; | 434 | alice_wanted.msg = NULL; |
@@ -480,9 +457,8 @@ join_bob_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
480 | static void | 457 | static void |
481 | join_alice_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 458 | join_alice_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
482 | { | 459 | { |
483 | #if VERBOSE | 460 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
484 | printf ("Alice joining\n"); | 461 | "Alice joining\n"); |
485 | #endif | ||
486 | alice_wanted.next_task = &join_bob_task; | 462 | alice_wanted.next_task = &join_bob_task; |
487 | alice_wanted.next_task_cls = NULL; | 463 | alice_wanted.next_task_cls = NULL; |
488 | alice_room = | 464 | alice_room = |
@@ -537,9 +513,6 @@ main (int argc, char *argv[]) | |||
537 | "test-chat", | 513 | "test-chat", |
538 | "-c", | 514 | "-c", |
539 | "test_chat_data.conf", | 515 | "test_chat_data.conf", |
540 | #if VERBOSE | ||
541 | "-L", "DEBUG", | ||
542 | #endif | ||
543 | NULL | 516 | NULL |
544 | }; | 517 | }; |
545 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 518 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
@@ -547,11 +520,7 @@ main (int argc, char *argv[]) | |||
547 | }; | 520 | }; |
548 | 521 | ||
549 | GNUNET_log_setup ("test_chat", | 522 | GNUNET_log_setup ("test_chat", |
550 | #if VERBOSE | ||
551 | "DEBUG", | ||
552 | #else | ||
553 | "WARNING", | 523 | "WARNING", |
554 | #endif | ||
555 | NULL); | 524 | NULL); |
556 | if (strstr (argv[0], "p2p") != NULL) | 525 | if (strstr (argv[0], "p2p") != NULL) |
557 | { | 526 | { |
diff --git a/src/chat/test_chat_private.c b/src/chat/test_chat_private.c index 64150c107..b911d091f 100644 --- a/src/chat/test_chat_private.c +++ b/src/chat/test_chat_private.c | |||
@@ -32,8 +32,6 @@ | |||
32 | 32 | ||
33 | #define VERBOSE GNUNET_NO | 33 | #define VERBOSE GNUNET_NO |
34 | 34 | ||
35 | #define START_ARM GNUNET_YES | ||
36 | |||
37 | /** | 35 | /** |
38 | * How long until we give up on passing the test? | 36 | * How long until we give up on passing the test? |
39 | */ | 37 | */ |
@@ -47,9 +45,7 @@ | |||
47 | struct PeerContext | 45 | struct PeerContext |
48 | { | 46 | { |
49 | struct GNUNET_CONFIGURATION_Handle *cfg; | 47 | struct GNUNET_CONFIGURATION_Handle *cfg; |
50 | #if START_ARM | ||
51 | struct GNUNET_OS_Process *arm_proc; | 48 | struct GNUNET_OS_Process *arm_proc; |
52 | #endif | ||
53 | }; | 49 | }; |
54 | 50 | ||
55 | struct Wanted | 51 | struct Wanted |
@@ -134,12 +130,10 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
134 | 130 | ||
135 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 131 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
136 | p->cfg = GNUNET_CONFIGURATION_create (); | 132 | p->cfg = GNUNET_CONFIGURATION_create (); |
137 | #if START_ARM | ||
138 | p->arm_proc = | 133 | p->arm_proc = |
139 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, | 134 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, |
140 | "gnunet-service-arm", | 135 | "gnunet-service-arm", |
141 | "-c", cfgname, NULL); | 136 | "-c", cfgname, NULL); |
142 | #endif | ||
143 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 137 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
144 | GNUNET_free (binary); | 138 | GNUNET_free (binary); |
145 | } | 139 | } |
@@ -148,7 +142,6 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
148 | static void | 142 | static void |
149 | stop_arm (struct PeerContext *p) | 143 | stop_arm (struct PeerContext *p) |
150 | { | 144 | { |
151 | #if START_ARM | ||
152 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 145 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
153 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 146 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
154 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 147 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
@@ -157,7 +150,6 @@ stop_arm (struct PeerContext *p) | |||
157 | GNUNET_OS_process_get_pid (p->arm_proc)); | 150 | GNUNET_OS_process_get_pid (p->arm_proc)); |
158 | GNUNET_OS_process_destroy (p->arm_proc); | 151 | GNUNET_OS_process_destroy (p->arm_proc); |
159 | p->arm_proc = NULL; | 152 | p->arm_proc = NULL; |
160 | #endif | ||
161 | GNUNET_CONFIGURATION_destroy (p->cfg); | 153 | GNUNET_CONFIGURATION_destroy (p->cfg); |
162 | } | 154 | } |
163 | 155 | ||
diff --git a/src/core/core.conf.in b/src/core/core.conf.in index fbe2f7948..ad39a8a79 100644 --- a/src/core/core.conf.in +++ b/src/core/core.conf.in | |||
@@ -10,7 +10,6 @@ UNIXPATH = /tmp/gnunet-service-core.sock | |||
10 | UNIX_MATCH_UID = YES | 10 | UNIX_MATCH_UID = YES |
11 | UNIX_MATCH_GID = YES | 11 | UNIX_MATCH_GID = YES |
12 | # DISABLE_SOCKET_FORWARDING = NO | 12 | # DISABLE_SOCKET_FORWARDING = NO |
13 | # DEBUG = YES | ||
14 | # USERNAME = | 13 | # USERNAME = |
15 | # MAXBUF = | 14 | # MAXBUF = |
16 | # TIMEOUT = | 15 | # TIMEOUT = |
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 11fd14504..68ae39df2 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -31,10 +31,6 @@ | |||
31 | #include "gnunet_scheduler_lib.h" | 31 | #include "gnunet_scheduler_lib.h" |
32 | #include "gnunet_transport_service.h" | 32 | #include "gnunet_transport_service.h" |
33 | 33 | ||
34 | #define VERBOSE GNUNET_NO | ||
35 | |||
36 | #define START_ARM GNUNET_YES | ||
37 | |||
38 | #define MTYPE 12345 | 34 | #define MTYPE 12345 |
39 | 35 | ||
40 | struct PeerContext | 36 | struct PeerContext |
@@ -46,9 +42,7 @@ struct PeerContext | |||
46 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; | 42 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; |
47 | struct GNUNET_MessageHeader *hello; | 43 | struct GNUNET_MessageHeader *hello; |
48 | int connect_status; | 44 | int connect_status; |
49 | #if START_ARM | ||
50 | struct GNUNET_OS_Process *arm_proc; | 45 | struct GNUNET_OS_Process *arm_proc; |
51 | #endif | ||
52 | }; | 46 | }; |
53 | 47 | ||
54 | static struct PeerContext p1; | 48 | static struct PeerContext p1; |
@@ -61,11 +55,7 @@ static GNUNET_SCHEDULER_TaskIdentifier con_task; | |||
61 | 55 | ||
62 | static int ok; | 56 | static int ok; |
63 | 57 | ||
64 | #if VERBOSE | ||
65 | #define OKPP do { ok++; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) | 58 | #define OKPP do { ok++; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Now at stage %u at %s:%u\n", ok, __FILE__, __LINE__); } while (0) |
66 | #else | ||
67 | #define OKPP do { ok++; } while (0) | ||
68 | #endif | ||
69 | 59 | ||
70 | 60 | ||
71 | static void | 61 | static void |
@@ -111,9 +101,8 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
111 | static void | 101 | static void |
112 | terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 102 | terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
113 | { | 103 | { |
114 | #if VERBOSE | 104 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
115 | FPRINTF (stderr, "ENDING ANGRILY %u\n", ok); | 105 | "ENDING ANGRILY %u\n", ok); |
116 | #endif | ||
117 | GNUNET_break (0); | 106 | GNUNET_break (0); |
118 | if (NULL != p1.ch) | 107 | if (NULL != p1.ch) |
119 | { | 108 | { |
@@ -320,14 +309,12 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
320 | 309 | ||
321 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 310 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
322 | p->cfg = GNUNET_CONFIGURATION_create (); | 311 | p->cfg = GNUNET_CONFIGURATION_create (); |
323 | #if START_ARM | ||
324 | p->arm_proc = | 312 | p->arm_proc = |
325 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, | 313 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, |
326 | NULL, NULL, | 314 | NULL, NULL, |
327 | binary, | 315 | binary, |
328 | "gnunet-service-arm", | 316 | "gnunet-service-arm", |
329 | "-c", cfgname, NULL); | 317 | "-c", cfgname, NULL); |
330 | #endif | ||
331 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 318 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
332 | p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL); | 319 | p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL); |
333 | GNUNET_assert (p->th != NULL); | 320 | GNUNET_assert (p->th != NULL); |
@@ -358,7 +345,6 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
358 | static void | 345 | static void |
359 | stop_arm (struct PeerContext *p) | 346 | stop_arm (struct PeerContext *p) |
360 | { | 347 | { |
361 | #if START_ARM | ||
362 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 348 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
363 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 349 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
364 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 350 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
@@ -367,19 +353,16 @@ stop_arm (struct PeerContext *p) | |||
367 | GNUNET_OS_process_get_pid (p->arm_proc)); | 353 | GNUNET_OS_process_get_pid (p->arm_proc)); |
368 | GNUNET_OS_process_destroy (p->arm_proc); | 354 | GNUNET_OS_process_destroy (p->arm_proc); |
369 | p->arm_proc = NULL; | 355 | p->arm_proc = NULL; |
370 | #endif | ||
371 | GNUNET_CONFIGURATION_destroy (p->cfg); | 356 | GNUNET_CONFIGURATION_destroy (p->cfg); |
372 | } | 357 | } |
373 | 358 | ||
359 | |||
374 | static int | 360 | static int |
375 | check () | 361 | check () |
376 | { | 362 | { |
377 | char *const argv[] = { "test-core-api", | 363 | char *const argv[] = { "test-core-api", |
378 | "-c", | 364 | "-c", |
379 | "test_core_api_data.conf", | 365 | "test_core_api_data.conf", |
380 | #if VERBOSE | ||
381 | "-L", "DEBUG", | ||
382 | #endif | ||
383 | NULL | 366 | NULL |
384 | }; | 367 | }; |
385 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 368 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
@@ -399,11 +382,7 @@ main (int argc, char *argv[]) | |||
399 | int ret; | 382 | int ret; |
400 | 383 | ||
401 | GNUNET_log_setup ("test-core-api", | 384 | GNUNET_log_setup ("test-core-api", |
402 | #if VERBOSE | ||
403 | "DEBUG", | ||
404 | #else | ||
405 | "WARNING", | 385 | "WARNING", |
406 | #endif | ||
407 | NULL); | 386 | NULL); |
408 | ret = check (); | 387 | ret = check (); |
409 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1"); | 388 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1"); |
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index dd70d438a..38c40da12 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c | |||
@@ -33,8 +33,6 @@ | |||
33 | #include "gnunet_transport_service.h" | 33 | #include "gnunet_transport_service.h" |
34 | #include <gauger.h> | 34 | #include <gauger.h> |
35 | 35 | ||
36 | #define START_ARM GNUNET_YES | ||
37 | |||
38 | /** | 36 | /** |
39 | * Note that this value must not significantly exceed | 37 | * Note that this value must not significantly exceed |
40 | * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise | 38 | * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise |
@@ -73,9 +71,7 @@ struct PeerContext | |||
73 | struct GNUNET_MessageHeader *hello; | 71 | struct GNUNET_MessageHeader *hello; |
74 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; | 72 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; |
75 | int connect_status; | 73 | int connect_status; |
76 | #if START_ARM | ||
77 | struct GNUNET_OS_Process *arm_proc; | 74 | struct GNUNET_OS_Process *arm_proc; |
78 | #endif | ||
79 | }; | 75 | }; |
80 | 76 | ||
81 | static struct PeerContext p1; | 77 | static struct PeerContext p1; |
@@ -121,8 +117,10 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
121 | GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); | 117 | GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); |
122 | GNUNET_CORE_disconnect (p1.ch); | 118 | GNUNET_CORE_disconnect (p1.ch); |
123 | p1.ch = NULL; | 119 | p1.ch = NULL; |
120 | GNUNET_free_non_null (p1.hello); | ||
124 | GNUNET_CORE_disconnect (p2.ch); | 121 | GNUNET_CORE_disconnect (p2.ch); |
125 | p2.ch = NULL; | 122 | p2.ch = NULL; |
123 | GNUNET_free_non_null (p2.hello); | ||
126 | if (connect_task != GNUNET_SCHEDULER_NO_TASK) | 124 | if (connect_task != GNUNET_SCHEDULER_NO_TASK) |
127 | GNUNET_SCHEDULER_cancel (connect_task); | 125 | GNUNET_SCHEDULER_cancel (connect_task); |
128 | GNUNET_TRANSPORT_disconnect (p1.th); | 126 | GNUNET_TRANSPORT_disconnect (p1.th); |
@@ -409,8 +407,7 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message) | |||
409 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 407 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
410 | "Received (my) `%s' from transport service\n", "HELLO"); | 408 | "Received (my) `%s' from transport service\n", "HELLO"); |
411 | GNUNET_assert (message != NULL); | 409 | GNUNET_assert (message != NULL); |
412 | p->hello = GNUNET_malloc (ntohs (message->size)); | 410 | p->hello = GNUNET_copy_message (message); |
413 | memcpy (p->hello, message, ntohs (message->size)); | ||
414 | if ((p == &p1) && (p2.th != NULL)) | 411 | if ((p == &p1) && (p2.th != NULL)) |
415 | GNUNET_TRANSPORT_offer_hello (p2.th, message, NULL, NULL); | 412 | GNUNET_TRANSPORT_offer_hello (p2.th, message, NULL, NULL); |
416 | if ((p == &p2) && (p1.th != NULL)) | 413 | if ((p == &p2) && (p1.th != NULL)) |
@@ -430,12 +427,10 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
430 | 427 | ||
431 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 428 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
432 | p->cfg = GNUNET_CONFIGURATION_create (); | 429 | p->cfg = GNUNET_CONFIGURATION_create (); |
433 | #if START_ARM | ||
434 | p->arm_proc = | 430 | p->arm_proc = |
435 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, | 431 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, |
436 | "gnunet-service-arm", | 432 | "gnunet-service-arm", |
437 | "-c", cfgname, NULL); | 433 | "-c", cfgname, NULL); |
438 | #endif | ||
439 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 434 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
440 | p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL); | 435 | p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL); |
441 | GNUNET_assert (p->th != NULL); | 436 | GNUNET_assert (p->th != NULL); |
@@ -463,7 +458,6 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
463 | static void | 458 | static void |
464 | stop_arm (struct PeerContext *p) | 459 | stop_arm (struct PeerContext *p) |
465 | { | 460 | { |
466 | #if START_ARM | ||
467 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 461 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
468 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 462 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
469 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 463 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
@@ -472,7 +466,6 @@ stop_arm (struct PeerContext *p) | |||
472 | GNUNET_OS_process_get_pid (p->arm_proc)); | 466 | GNUNET_OS_process_get_pid (p->arm_proc)); |
473 | GNUNET_OS_process_destroy (p->arm_proc); | 467 | GNUNET_OS_process_destroy (p->arm_proc); |
474 | p->arm_proc = NULL; | 468 | p->arm_proc = NULL; |
475 | #endif | ||
476 | GNUNET_CONFIGURATION_destroy (p->cfg); | 469 | GNUNET_CONFIGURATION_destroy (p->cfg); |
477 | } | 470 | } |
478 | 471 | ||
diff --git a/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf b/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf index dcd886280..25eb25b96 100644 --- a/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf +++ b/src/core/test_core_quota_asymmetric_recv_limited_peer1.conf | |||
@@ -34,5 +34,4 @@ WAN_QUOTA_OUT = 1 MB | |||
34 | [core] | 34 | [core] |
35 | PORT = 12490 | 35 | PORT = 12490 |
36 | UNIXPATH = /tmp/gnunet-core-asym-recv-p1-service-core.sock | 36 | UNIXPATH = /tmp/gnunet-core-asym-recv-p1-service-core.sock |
37 | DEBUG = NO | ||
38 | 37 | ||
diff --git a/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf b/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf index 13f29e91a..062f12ae6 100644 --- a/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf +++ b/src/core/test_core_quota_asymmetric_recv_limited_peer2.conf | |||
@@ -26,7 +26,6 @@ UNIXPATH = /tmp/gnunet-core-asym-recv-p2-service-transport.sock | |||
26 | [core] | 26 | [core] |
27 | PORT = 22490 | 27 | PORT = 22490 |
28 | UNIXPATH = /tmp/gnunet-core-asym-recv-p2-service-core.sock | 28 | UNIXPATH = /tmp/gnunet-core-asym-recv-p2-service-core.sock |
29 | DEBUG = NO | ||
30 | 29 | ||
31 | [ats] | 30 | [ats] |
32 | PORT = 22491 | 31 | PORT = 22491 |
diff --git a/src/core/test_core_quota_asymmetric_send_limit_peer1.conf b/src/core/test_core_quota_asymmetric_send_limit_peer1.conf index 09c4ed049..36d60f1ac 100644 --- a/src/core/test_core_quota_asymmetric_send_limit_peer1.conf +++ b/src/core/test_core_quota_asymmetric_send_limit_peer1.conf | |||
@@ -34,4 +34,3 @@ UNIXPATH = /tmp/gnunet-core-asym-send-p1-service-ats.sock | |||
34 | [core] | 34 | [core] |
35 | PORT = 12490 | 35 | PORT = 12490 |
36 | UNIXPATH = /tmp/gnunet-core-asym-send-p1-service-core.sock | 36 | UNIXPATH = /tmp/gnunet-core-asym-send-p1-service-core.sock |
37 | DEBUG = NO | ||
diff --git a/src/core/test_core_quota_asymmetric_send_limit_peer2.conf b/src/core/test_core_quota_asymmetric_send_limit_peer2.conf index 03d5bce12..b6e417483 100644 --- a/src/core/test_core_quota_asymmetric_send_limit_peer2.conf +++ b/src/core/test_core_quota_asymmetric_send_limit_peer2.conf | |||
@@ -25,7 +25,6 @@ UNIXPATH = /tmp/gnunet-core-asym-send-p2-service-transport.sock | |||
25 | [core] | 25 | [core] |
26 | PORT = 22490 | 26 | PORT = 22490 |
27 | UNIXPATH = /tmp/gnunet-core-asym-send-p2-service-core.sock | 27 | UNIXPATH = /tmp/gnunet-core-asym-send-p2-service-core.sock |
28 | DEBUG = NO | ||
29 | 28 | ||
30 | [ats] | 29 | [ats] |
31 | PORT = 22491 | 30 | PORT = 22491 |
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index 88a915095..7f675a637 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -38,8 +38,6 @@ | |||
38 | #define ASYMMETRIC_SEND_LIMITED 1 | 38 | #define ASYMMETRIC_SEND_LIMITED 1 |
39 | #define ASYMMETRIC_RECV_LIMITED 2 | 39 | #define ASYMMETRIC_RECV_LIMITED 2 |
40 | 40 | ||
41 | #define START_ARM GNUNET_YES | ||
42 | |||
43 | /** | 41 | /** |
44 | * Note that this value must not significantly exceed | 42 | * Note that this value must not significantly exceed |
45 | * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise | 43 | * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise |
@@ -84,9 +82,7 @@ struct PeerContext | |||
84 | struct GNUNET_STATISTICS_Handle *stats; | 82 | struct GNUNET_STATISTICS_Handle *stats; |
85 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; | 83 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; |
86 | int connect_status; | 84 | int connect_status; |
87 | #if START_ARM | ||
88 | struct GNUNET_OS_Process *arm_proc; | 85 | struct GNUNET_OS_Process *arm_proc; |
89 | #endif | ||
90 | }; | 86 | }; |
91 | 87 | ||
92 | static struct PeerContext p1; | 88 | static struct PeerContext p1; |
@@ -146,6 +142,8 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
146 | p1.th = NULL; | 142 | p1.th = NULL; |
147 | GNUNET_TRANSPORT_disconnect (p2.th); | 143 | GNUNET_TRANSPORT_disconnect (p2.th); |
148 | p2.th = NULL; | 144 | p2.th = NULL; |
145 | GNUNET_free_non_null (p1.hello); | ||
146 | GNUNET_free_non_null (p2.hello); | ||
149 | } | 147 | } |
150 | 148 | ||
151 | 149 | ||
@@ -574,12 +572,10 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
574 | 572 | ||
575 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 573 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
576 | p->cfg = GNUNET_CONFIGURATION_create (); | 574 | p->cfg = GNUNET_CONFIGURATION_create (); |
577 | #if START_ARM | ||
578 | p->arm_proc = | 575 | p->arm_proc = |
579 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, | 576 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, |
580 | "gnunet-service-arm", | 577 | "gnunet-service-arm", |
581 | "-c", cfgname, NULL); | 578 | "-c", cfgname, NULL); |
582 | #endif | ||
583 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 579 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
584 | p->stats = GNUNET_STATISTICS_create ("core", p->cfg); | 580 | p->stats = GNUNET_STATISTICS_create ("core", p->cfg); |
585 | GNUNET_assert (p->stats != NULL); | 581 | GNUNET_assert (p->stats != NULL); |
@@ -642,7 +638,6 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
642 | static void | 638 | static void |
643 | stop_arm (struct PeerContext *p) | 639 | stop_arm (struct PeerContext *p) |
644 | { | 640 | { |
645 | #if START_ARM | ||
646 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 641 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
647 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 642 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
648 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) | 643 | if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) |
@@ -651,7 +646,6 @@ stop_arm (struct PeerContext *p) | |||
651 | GNUNET_OS_process_get_pid (p->arm_proc)); | 646 | GNUNET_OS_process_get_pid (p->arm_proc)); |
652 | GNUNET_OS_process_destroy (p->arm_proc); | 647 | GNUNET_OS_process_destroy (p->arm_proc); |
653 | p->arm_proc = NULL; | 648 | p->arm_proc = NULL; |
654 | #endif | ||
655 | GNUNET_CONFIGURATION_destroy (p->cfg); | 649 | GNUNET_CONFIGURATION_destroy (p->cfg); |
656 | } | 650 | } |
657 | 651 | ||
diff --git a/src/core/test_core_quota_peer1.conf b/src/core/test_core_quota_peer1.conf index 4a67bfe66..43ef84505 100644 --- a/src/core/test_core_quota_peer1.conf +++ b/src/core/test_core_quota_peer1.conf | |||
@@ -32,7 +32,6 @@ WAN_QUOTA_OUT = 10240 | |||
32 | [core] | 32 | [core] |
33 | PORT = 12480 | 33 | PORT = 12480 |
34 | UNIXPATH = /tmp/gnunet-core-sym-p1-service-core.sock | 34 | UNIXPATH = /tmp/gnunet-core-sym-p1-service-core.sock |
35 | DEBUG = NO | ||
36 | 35 | ||
37 | [ats] | 36 | [ats] |
38 | PORT = 12481 | 37 | PORT = 12481 |
diff --git a/src/core/test_core_quota_peer2.conf b/src/core/test_core_quota_peer2.conf index e288da064..b100f9fb4 100644 --- a/src/core/test_core_quota_peer2.conf +++ b/src/core/test_core_quota_peer2.conf | |||
@@ -25,7 +25,6 @@ UNIXPATH = /tmp/gnunet-core-sym-p2-service-transport.sock | |||
25 | [core] | 25 | [core] |
26 | PORT = 22480 | 26 | PORT = 22480 |
27 | UNIXPATH = /tmp/gnunet-core-sym-p2-service-core.sock | 27 | UNIXPATH = /tmp/gnunet-core-sym-p2-service-core.sock |
28 | DEBUG = NO | ||
29 | 28 | ||
30 | [ats] | 29 | [ats] |
31 | PORT = 22482 | 30 | PORT = 22482 |
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c index 96a5aebe5..5aba51123 100644 --- a/src/datastore/test_plugin_datastore.c +++ b/src/datastore/test_plugin_datastore.c | |||
@@ -320,6 +320,8 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
320 | if (NULL == (ret = GNUNET_PLUGIN_load (libname, &env))) | 320 | if (NULL == (ret = GNUNET_PLUGIN_load (libname, &env))) |
321 | { | 321 | { |
322 | FPRINTF (stderr, "Failed to load plugin `%s'!\n", name); | 322 | FPRINTF (stderr, "Failed to load plugin `%s'!\n", name); |
323 | GNUNET_free (libname); | ||
324 | GNUNET_free (name); | ||
323 | return NULL; | 325 | return NULL; |
324 | } | 326 | } |
325 | GNUNET_free (libname); | 327 | GNUNET_free (libname); |
diff --git a/src/dht/dht.conf.in b/src/dht/dht.conf.in index 553429dc8..d6afe39e9 100644 --- a/src/dht/dht.conf.in +++ b/src/dht/dht.conf.in | |||
@@ -12,7 +12,6 @@ UNIXPATH = /tmp/gnunet-service-dht.sock | |||
12 | UNIX_MATCH_UID = YES | 12 | UNIX_MATCH_UID = YES |
13 | UNIX_MATCH_GID = YES | 13 | UNIX_MATCH_GID = YES |
14 | # DISABLE_SOCKET_FORWARDING = NO | 14 | # DISABLE_SOCKET_FORWARDING = NO |
15 | # DEBUG = YES | ||
16 | # USERNAME = | 15 | # USERNAME = |
17 | # MAXBUF = | 16 | # MAXBUF = |
18 | # TIMEOUT = | 17 | # TIMEOUT = |
diff --git a/src/dht/test_dht_api_data.conf b/src/dht/test_dht_api_data.conf index 42ccf9687..58e509cbb 100644 --- a/src/dht/test_dht_api_data.conf +++ b/src/dht/test_dht_api_data.conf | |||
@@ -27,7 +27,6 @@ WAN_QUOTA_OUT = 1 GB | |||
27 | PORT = 2092 | 27 | PORT = 2092 |
28 | 28 | ||
29 | [dht] | 29 | [dht] |
30 | DEBUG = NO | ||
31 | PORT = 12370 | 30 | PORT = 12370 |
32 | 31 | ||
33 | [block] | 32 | [block] |
@@ -35,7 +34,6 @@ plugins = dht test | |||
35 | 34 | ||
36 | [transport] | 35 | [transport] |
37 | plugins = tcp | 36 | plugins = tcp |
38 | DEBUG = NO | ||
39 | NEIGHBOUR_LIMIT = 50 | 37 | NEIGHBOUR_LIMIT = 50 |
40 | PORT = 2091 | 38 | PORT = 2091 |
41 | 39 | ||
diff --git a/src/dht/test_dht_api_peer1.conf b/src/dht/test_dht_api_peer1.conf index eea39e031..fd2ee804f 100644 --- a/src/dht/test_dht_api_peer1.conf +++ b/src/dht/test_dht_api_peer1.conf | |||
@@ -5,7 +5,6 @@ AUTOSTART = NO | |||
5 | AUTOSTART = NO | 5 | AUTOSTART = NO |
6 | 6 | ||
7 | [dht] | 7 | [dht] |
8 | DEBUG = NO | ||
9 | AUTOSTART = YES | 8 | AUTOSTART = YES |
10 | ACCEPT_FROM6 = ::1; | 9 | ACCEPT_FROM6 = ::1; |
11 | ACCEPT_FROM = 127.0.0.1; | 10 | ACCEPT_FROM = 127.0.0.1; |
@@ -22,7 +21,6 @@ DATABASE = sqlite | |||
22 | 21 | ||
23 | [transport] | 22 | [transport] |
24 | PLUGINS = tcp | 23 | PLUGINS = tcp |
25 | DEBUG = NO | ||
26 | ACCEPT_FROM6 = ::1; | 24 | ACCEPT_FROM6 = ::1; |
27 | ACCEPT_FROM = 127.0.0.1; | 25 | ACCEPT_FROM = 127.0.0.1; |
28 | NEIGHBOUR_LIMIT = 50 | 26 | NEIGHBOUR_LIMIT = 50 |
@@ -38,7 +36,6 @@ PORT = 12092 | |||
38 | [arm] | 36 | [arm] |
39 | DEFAULTSERVICES = core | 37 | DEFAULTSERVICES = core |
40 | PORT = 12366 | 38 | PORT = 12366 |
41 | DEBUG = NO | ||
42 | 39 | ||
43 | [transport-tcp] | 40 | [transport-tcp] |
44 | TIMEOUT = 300 s | 41 | TIMEOUT = 300 s |
diff --git a/src/dns/gnunet-dns-monitor.c b/src/dns/gnunet-dns-monitor.c index 8f05403fb..747a87556 100644 --- a/src/dns/gnunet-dns-monitor.c +++ b/src/dns/gnunet-dns-monitor.c | |||
@@ -363,12 +363,13 @@ main (int argc, char *const *argv) | |||
363 | 363 | ||
364 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 364 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
365 | return 2; | 365 | return 2; |
366 | 366 | ret = (GNUNET_OK == | |
367 | return (GNUNET_OK == | 367 | GNUNET_PROGRAM_run (argc, argv, "gnunet-dns-monitor", |
368 | GNUNET_PROGRAM_run (argc, argv, "gnunet-dns-monitor", | 368 | gettext_noop |
369 | gettext_noop | 369 | ("Monitor DNS queries."), options, |
370 | ("Monitor DNS queries."), options, | 370 | &run, NULL)) ? ret : 1; |
371 | &run, NULL)) ? ret : 1; | 371 | GNUNET_free ((void*) argv); |
372 | return ret; | ||
372 | } | 373 | } |
373 | 374 | ||
374 | 375 | ||
diff --git a/src/dns/gnunet-dns-redirector.c b/src/dns/gnunet-dns-redirector.c index 5ba7e87c6..3df2ac21a 100644 --- a/src/dns/gnunet-dns-redirector.c +++ b/src/dns/gnunet-dns-redirector.c | |||
@@ -245,11 +245,13 @@ main (int argc, char *const *argv) | |||
245 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 245 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
246 | return 2; | 246 | return 2; |
247 | 247 | ||
248 | return (GNUNET_OK == | 248 | ret = (GNUNET_OK == |
249 | GNUNET_PROGRAM_run (argc, argv, "gnunet-dns-redirector", | 249 | GNUNET_PROGRAM_run (argc, argv, "gnunet-dns-redirector", |
250 | gettext_noop | 250 | gettext_noop |
251 | ("Change DNS replies to point elsewhere."), options, | 251 | ("Change DNS replies to point elsewhere."), options, |
252 | &run, NULL)) ? ret : 1; | 252 | &run, NULL)) ? ret : 1; |
253 | GNUNET_free ((void*) argv); | ||
254 | return ret; | ||
253 | } | 255 | } |
254 | 256 | ||
255 | 257 | ||
diff --git a/src/dv/dv.conf.in b/src/dv/dv.conf.in index 158bbcdd6..c0dc21bfd 100644 --- a/src/dv/dv.conf.in +++ b/src/dv/dv.conf.in | |||
@@ -1,6 +1,5 @@ | |||
1 | [dv] | 1 | [dv] |
2 | AUTOSTART = YES | 2 | AUTOSTART = YES |
3 | DEBUG = NO | ||
4 | ACCEPT_FROM6 = ::1; | 3 | ACCEPT_FROM6 = ::1; |
5 | ACCEPT_FROM = 127.0.0.1; | 4 | ACCEPT_FROM = 127.0.0.1; |
6 | BINARY = gnunet-service-dv | 5 | BINARY = gnunet-service-dv |
diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c index c78d5072d..da822ca8f 100644 --- a/src/dv/test_transport_api_dv.c +++ b/src/dv/test_transport_api_dv.c | |||
@@ -25,8 +25,6 @@ | |||
25 | #include "gnunet_testing_lib.h" | 25 | #include "gnunet_testing_lib.h" |
26 | #include "gnunet_core_service.h" | 26 | #include "gnunet_core_service.h" |
27 | 27 | ||
28 | #define VERBOSE 1 | ||
29 | |||
30 | #define TEST_ALL GNUNET_NO | 28 | #define TEST_ALL GNUNET_NO |
31 | 29 | ||
32 | /** | 30 | /** |
@@ -176,17 +174,13 @@ shutdown_callback (void *cls, const char *emsg) | |||
176 | { | 174 | { |
177 | if (emsg != NULL) | 175 | if (emsg != NULL) |
178 | { | 176 | { |
179 | #if VERBOSE | ||
180 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown of peers failed!\n"); | 177 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown of peers failed!\n"); |
181 | #endif | ||
182 | if (ok == 0) | 178 | if (ok == 0) |
183 | ok = 666; | 179 | ok = 666; |
184 | } | 180 | } |
185 | else | 181 | else |
186 | { | 182 | { |
187 | #if VERBOSE | ||
188 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All peers successfully shut down!\n"); | 183 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "All peers successfully shut down!\n"); |
189 | #endif | ||
190 | } | 184 | } |
191 | } | 185 | } |
192 | 186 | ||
@@ -200,10 +194,8 @@ finish_testing (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
200 | struct TestMessageContext *free_pos; | 194 | struct TestMessageContext *free_pos; |
201 | 195 | ||
202 | die_task = GNUNET_SCHEDULER_NO_TASK; | 196 | die_task = GNUNET_SCHEDULER_NO_TASK; |
203 | #if VERBOSE | ||
204 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 197 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
205 | "Called finish testing, stopping daemons.\n"); | 198 | "Called finish testing, stopping daemons.\n"); |
206 | #endif | ||
207 | peer_pos = all_peers; | 199 | peer_pos = all_peers; |
208 | while (peer_pos != NULL) | 200 | while (peer_pos != NULL) |
209 | { | 201 | { |
@@ -258,20 +250,11 @@ finish_testing (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
258 | } | 250 | } |
259 | GNUNET_free (free_pos); | 251 | GNUNET_free (free_pos); |
260 | } | 252 | } |
261 | #if VERBOSE | ||
262 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 253 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
263 | "transmit_ready's scheduled %d, failed %d, transmit_ready's called %d\n", | 254 | "transmit_ready's scheduled %d, failed %d, transmit_ready's called %d\n", |
264 | transmit_ready_scheduled, transmit_ready_failed, | 255 | transmit_ready_scheduled, transmit_ready_failed, |
265 | transmit_ready_called); | 256 | transmit_ready_called); |
266 | #endif | ||
267 | |||
268 | #if VERBOSE | ||
269 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Calling daemons_stop\n"); | ||
270 | #endif | ||
271 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 257 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
272 | #if VERBOSE | ||
273 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "daemons_stop finished\n"); | ||
274 | #endif | ||
275 | if (dotOutFile != NULL) | 258 | if (dotOutFile != NULL) |
276 | { | 259 | { |
277 | FPRINTF (dotOutFile, "%s", "}"); | 260 | FPRINTF (dotOutFile, "%s", "}"); |
@@ -288,16 +271,12 @@ disconnect_cores (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
288 | struct TestMessageContext *pos = cls; | 271 | struct TestMessageContext *pos = cls; |
289 | 272 | ||
290 | /* Disconnect from the respective cores */ | 273 | /* Disconnect from the respective cores */ |
291 | #if VERBOSE | ||
292 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from peer 1 `%4s'\n", | 274 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from peer 1 `%4s'\n", |
293 | GNUNET_i2s (&pos->peer1->id)); | 275 | GNUNET_i2s (&pos->peer1->id)); |
294 | #endif | ||
295 | if (pos->peer1handle != NULL) | 276 | if (pos->peer1handle != NULL) |
296 | GNUNET_CORE_disconnect (pos->peer1handle); | 277 | GNUNET_CORE_disconnect (pos->peer1handle); |
297 | #if VERBOSE | ||
298 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from peer 2 `%4s'\n", | 278 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from peer 2 `%4s'\n", |
299 | GNUNET_i2s (&pos->peer2->id)); | 279 | GNUNET_i2s (&pos->peer2->id)); |
300 | #endif | ||
301 | if (pos->peer2handle != NULL) | 280 | if (pos->peer2handle != NULL) |
302 | GNUNET_CORE_disconnect (pos->peer2handle); | 281 | GNUNET_CORE_disconnect (pos->peer2handle); |
303 | /* Set handles to NULL so test case can be ended properly */ | 282 | /* Set handles to NULL so test case can be ended properly */ |
@@ -422,23 +401,17 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
422 | { | 401 | { |
423 | struct TestMessageContext *pos = cls; | 402 | struct TestMessageContext *pos = cls; |
424 | struct GNUNET_TestMessage *msg = (struct GNUNET_TestMessage *) message; | 403 | struct GNUNET_TestMessage *msg = (struct GNUNET_TestMessage *) message; |
425 | |||
426 | #if VERBOSE | ||
427 | uint32_t distance; | 404 | uint32_t distance; |
428 | #endif | 405 | |
429 | if (pos->uid != ntohl (msg->uid)) | 406 | if (pos->uid != ntohl (msg->uid)) |
430 | return GNUNET_OK; | 407 | return GNUNET_OK; |
431 | |||
432 | #if VERBOSE | ||
433 | distance = get_atsi_distance (atsi, atsi_count); | 408 | distance = get_atsi_distance (atsi, atsi_count); |
434 | #endif | ||
435 | GNUNET_assert (0 == | 409 | GNUNET_assert (0 == |
436 | memcmp (peer, &pos->peer1->id, | 410 | memcmp (peer, &pos->peer1->id, |
437 | sizeof (struct GNUNET_PeerIdentity))); | 411 | sizeof (struct GNUNET_PeerIdentity))); |
438 | if (total_other_expected_messages == 0) | 412 | if (total_other_expected_messages == 0) |
439 | { | 413 | { |
440 | total_messages_received++; | 414 | total_messages_received++; |
441 | #if VERBOSE | ||
442 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 415 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
443 | "Received message from `%4s', type %d, uid %u, distance %u.\n", | 416 | "Received message from `%4s', type %d, uid %u, distance %u.\n", |
444 | GNUNET_i2s (peer), ntohs (message->type), ntohl (msg->uid), | 417 | GNUNET_i2s (peer), ntohs (message->type), ntohl (msg->uid), |
@@ -446,12 +419,10 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
446 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 419 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
447 | "Total messages received %d, expected %d.\n", | 420 | "Total messages received %d, expected %d.\n", |
448 | total_messages_received, expected_messages); | 421 | total_messages_received, expected_messages); |
449 | #endif | ||
450 | } | 422 | } |
451 | else | 423 | else |
452 | { | 424 | { |
453 | total_other_messages++; | 425 | total_other_messages++; |
454 | #if VERBOSE | ||
455 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 426 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
456 | "Received message from `%4s', type %d, uid %u, distance %u.\n", | 427 | "Received message from `%4s', type %d, uid %u, distance %u.\n", |
457 | GNUNET_i2s (peer), ntohs (message->type), ntohl (msg->uid), | 428 | GNUNET_i2s (peer), ntohs (message->type), ntohl (msg->uid), |
@@ -459,17 +430,14 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
459 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 430 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
460 | "Total OTHER messages received %d, expected %d.\n", | 431 | "Total OTHER messages received %d, expected %d.\n", |
461 | total_other_messages, total_other_expected_messages); | 432 | total_other_messages, total_other_expected_messages); |
462 | #endif | ||
463 | } | 433 | } |
464 | 434 | ||
465 | if ((total_messages_received == expected_messages) && | 435 | if ((total_messages_received == expected_messages) && |
466 | (total_other_messages == 0)) | 436 | (total_other_messages == 0)) |
467 | { | 437 | { |
468 | GNUNET_SCHEDULER_cancel (die_task); | 438 | GNUNET_SCHEDULER_cancel (die_task); |
469 | #if VERBOSE | ||
470 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 439 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
471 | "Scheduling timeout from DV connections.\n"); | 440 | "Scheduling timeout from DV connections.\n"); |
472 | #endif | ||
473 | die_task = | 441 | die_task = |
474 | GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &end_badly, | 442 | GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, &end_badly, |
475 | "waiting for DV peers to connect!"); | 443 | "waiting for DV peers to connect!"); |
@@ -500,12 +468,10 @@ transmit_ready (void *cls, size_t size, void *buf) | |||
500 | m->header.size = htons (sizeof (struct GNUNET_TestMessage)); | 468 | m->header.size = htons (sizeof (struct GNUNET_TestMessage)); |
501 | m->uid = htonl (pos->uid); | 469 | m->uid = htonl (pos->uid); |
502 | transmit_ready_called++; | 470 | transmit_ready_called++; |
503 | #if VERBOSE | ||
504 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 471 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
505 | "transmit ready for peer %s\ntransmit_ready's scheduled %d, transmit_ready's called %d\n", | 472 | "transmit ready for peer %s\ntransmit_ready's scheduled %d, transmit_ready's called %d\n", |
506 | GNUNET_i2s (&pos->peer1->id), transmit_ready_scheduled, | 473 | GNUNET_i2s (&pos->peer1->id), transmit_ready_scheduled, |
507 | transmit_ready_called); | 474 | transmit_ready_called); |
508 | #endif | ||
509 | return sizeof (struct GNUNET_TestMessage); | 475 | return sizeof (struct GNUNET_TestMessage); |
510 | } | 476 | } |
511 | 477 | ||
@@ -537,11 +503,9 @@ connect_notify_peer2 (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
537 | 503 | ||
538 | if (0 == memcmp (&pos->peer1->id, peer, sizeof (struct GNUNET_PeerIdentity))) | 504 | if (0 == memcmp (&pos->peer1->id, peer, sizeof (struct GNUNET_PeerIdentity))) |
539 | { | 505 | { |
540 | #if VERBOSE | ||
541 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 506 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
542 | "Core connection from `%s' to `%4s' verfied, sending message!\n", | 507 | "Core connection from `%s' to `%4s' verfied, sending message!\n", |
543 | GNUNET_i2s (&pos->peer2->id), GNUNET_h2s (&peer->hashPubKey)); | 508 | GNUNET_i2s (&pos->peer2->id), GNUNET_h2s (&peer->hashPubKey)); |
544 | #endif | ||
545 | if (NULL == | 509 | if (NULL == |
546 | GNUNET_CORE_notify_transmit_ready (pos->peer1handle, GNUNET_YES, 0, | 510 | GNUNET_CORE_notify_transmit_ready (pos->peer1handle, GNUNET_YES, 0, |
547 | TIMEOUT, &pos->peer2->id, | 511 | TIMEOUT, &pos->peer2->id, |
@@ -566,11 +530,9 @@ static void | |||
566 | init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server, | 530 | init_notify_peer2 (void *cls, struct GNUNET_CORE_Handle *server, |
567 | const struct GNUNET_PeerIdentity *my_identity) | 531 | const struct GNUNET_PeerIdentity *my_identity) |
568 | { | 532 | { |
569 | #if VERBOSE | ||
570 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 533 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
571 | "Core connection to `%4s' established, awaiting connections.\n", | 534 | "Core connection to `%4s' established, awaiting connections.\n", |
572 | GNUNET_i2s (my_identity)); | 535 | GNUNET_i2s (my_identity)); |
573 | #endif | ||
574 | total_server_connections++; | 536 | total_server_connections++; |
575 | } | 537 | } |
576 | 538 | ||
@@ -592,11 +554,9 @@ connect_notify_peer1 (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
592 | 554 | ||
593 | if (0 == memcmp (&pos->peer2->id, peer, sizeof (struct GNUNET_PeerIdentity))) | 555 | if (0 == memcmp (&pos->peer2->id, peer, sizeof (struct GNUNET_PeerIdentity))) |
594 | { | 556 | { |
595 | #if VERBOSE | ||
596 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 557 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
597 | "Core connection from `%s' to `%4s' verified.\n", | 558 | "Core connection from `%s' to `%4s' verified.\n", |
598 | GNUNET_i2s (&pos->peer1->id), GNUNET_h2s (&peer->hashPubKey)); | 559 | GNUNET_i2s (&pos->peer1->id), GNUNET_h2s (&peer->hashPubKey)); |
599 | #endif | ||
600 | /* | 560 | /* |
601 | * Connect to the receiving peer | 561 | * Connect to the receiving peer |
602 | */ | 562 | */ |
@@ -612,11 +572,9 @@ init_notify_peer1 (void *cls, struct GNUNET_CORE_Handle *server, | |||
612 | const struct GNUNET_PeerIdentity *my_identity) | 572 | const struct GNUNET_PeerIdentity *my_identity) |
613 | { | 573 | { |
614 | total_server_connections++; | 574 | total_server_connections++; |
615 | #if VERBOSE | ||
616 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 575 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
617 | "Core connection to `%4s' established, awaiting connections...\n", | 576 | "Core connection to `%4s' established, awaiting connections...\n", |
618 | GNUNET_i2s (my_identity)); | 577 | GNUNET_i2s (my_identity)); |
619 | #endif | ||
620 | } | 578 | } |
621 | 579 | ||
622 | 580 | ||
@@ -642,11 +600,9 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
642 | &send_test_messages, pos); | 600 | &send_test_messages, pos); |
643 | return; /* Otherwise we'll double schedule messages here! */ | 601 | return; /* Otherwise we'll double schedule messages here! */ |
644 | } | 602 | } |
645 | #if VERBOSE | ||
646 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 603 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
647 | "Attempting to send test message from %s to %s\n", | 604 | "Attempting to send test message from %s to %s\n", |
648 | pos->peer1->shortname, pos->peer2->shortname); | 605 | pos->peer1->shortname, pos->peer2->shortname); |
649 | #endif | ||
650 | /* | 606 | /* |
651 | * Connect to the sending peer | 607 | * Connect to the sending peer |
652 | */ | 608 | */ |
@@ -739,12 +695,9 @@ send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
739 | GNUNET_SCHEDULER_add_now (&end_badly, | 695 | GNUNET_SCHEDULER_add_now (&end_badly, |
740 | "send_other_messages had 0 messages to send, no DV connections made!"); | 696 | "send_other_messages had 0 messages to send, no DV connections made!"); |
741 | } | 697 | } |
742 | #if VERBOSE | ||
743 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 698 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
744 | "Preparing to send %d other test messages\n", | 699 | "Preparing to send %d other test messages\n", |
745 | total_other_expected_messages); | 700 | total_other_expected_messages); |
746 | #endif | ||
747 | |||
748 | GNUNET_SCHEDULER_add_now (&send_test_messages, other_test_messages); | 701 | GNUNET_SCHEDULER_add_now (&send_test_messages, other_test_messages); |
749 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 702 | if (GNUNET_SCHEDULER_NO_TASK != die_task) |
750 | GNUNET_SCHEDULER_cancel (die_task); | 703 | GNUNET_SCHEDULER_cancel (die_task); |
@@ -768,11 +721,9 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
768 | if (emsg == NULL) | 721 | if (emsg == NULL) |
769 | { | 722 | { |
770 | total_connections++; | 723 | total_connections++; |
771 | #if VERBOSE | ||
772 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 724 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
773 | "connected peer %s to peer %s, distance %u\n", | 725 | "connected peer %s to peer %s, distance %u\n", |
774 | first_daemon->shortname, second_daemon->shortname, distance); | 726 | first_daemon->shortname, second_daemon->shortname, distance); |
775 | #endif | ||
776 | temp_context = GNUNET_malloc (sizeof (struct TestMessageContext)); | 727 | temp_context = GNUNET_malloc (sizeof (struct TestMessageContext)); |
777 | temp_context->peer1 = first_daemon; | 728 | temp_context->peer1 = first_daemon; |
778 | temp_context->peer2 = second_daemon; | 729 | temp_context->peer2 = second_daemon; |
@@ -782,7 +733,6 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
782 | test_messages = temp_context; | 733 | test_messages = temp_context; |
783 | expected_messages++; | 734 | expected_messages++; |
784 | } | 735 | } |
785 | #if VERBOSE | ||
786 | else | 736 | else |
787 | { | 737 | { |
788 | failed_connections++; | 738 | failed_connections++; |
@@ -790,15 +740,12 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
790 | "Failed to connect peer %s to peer %s with error :\n%s\n", | 740 | "Failed to connect peer %s to peer %s with error :\n%s\n", |
791 | first_daemon->shortname, second_daemon->shortname, emsg); | 741 | first_daemon->shortname, second_daemon->shortname, emsg); |
792 | } | 742 | } |
793 | #endif | ||
794 | 743 | ||
795 | if (total_connections == expected_connections) | 744 | if (total_connections == expected_connections) |
796 | { | 745 | { |
797 | #if VERBOSE | ||
798 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 746 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
799 | "Created %u total connections, which is our target number! Calling send messages.\n", | 747 | "Created %u total connections, which is our target number! Calling send messages.\n", |
800 | total_connections); | 748 | total_connections); |
801 | #endif | ||
802 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 749 | if (GNUNET_SCHEDULER_NO_TASK != die_task) |
803 | GNUNET_SCHEDULER_cancel (die_task); | 750 | GNUNET_SCHEDULER_cancel (die_task); |
804 | die_task = GNUNET_SCHEDULER_NO_TASK; | 751 | die_task = GNUNET_SCHEDULER_NO_TASK; |
@@ -825,13 +772,11 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first, | |||
825 | } | 772 | } |
826 | else | 773 | else |
827 | { | 774 | { |
828 | #if VERBOSE | ||
829 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 775 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
830 | "Have %d total connections, %d failed connections, Want %d (at least %d)\n", | 776 | "Have %d total connections, %d failed connections, Want %d (at least %d)\n", |
831 | total_connections, failed_connections, expected_connections, | 777 | total_connections, failed_connections, expected_connections, |
832 | expected_connections - | 778 | expected_connections - |
833 | (unsigned int) (fail_percentage * expected_connections)); | 779 | (unsigned int) (fail_percentage * expected_connections)); |
834 | #endif | ||
835 | } | 780 | } |
836 | } | 781 | } |
837 | 782 | ||
@@ -864,12 +809,9 @@ all_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
864 | second_shortname = GNUNET_strdup (GNUNET_i2s (peer)); | 809 | second_shortname = GNUNET_strdup (GNUNET_i2s (peer)); |
865 | distance = get_atsi_distance (atsi, atsi_count); | 810 | distance = get_atsi_distance (atsi, atsi_count); |
866 | 811 | ||
867 | #if VERBOSE | ||
868 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 812 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
869 | "connected peer %s to peer %s, distance %u\n", d->shortname, | 813 | "connected peer %s to peer %s, distance %u\n", d->shortname, |
870 | second_shortname, distance); | 814 | second_shortname, distance); |
871 | #endif | ||
872 | |||
873 | second_daemon = | 815 | second_daemon = |
874 | GNUNET_CONTAINER_multihashmap_get (peer_daemon_hash, &peer->hashPubKey); | 816 | GNUNET_CONTAINER_multihashmap_get (peer_daemon_hash, &peer->hashPubKey); |
875 | 817 | ||
@@ -933,10 +875,8 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
933 | return; | 875 | return; |
934 | } | 876 | } |
935 | GNUNET_assert (id != NULL); | 877 | GNUNET_assert (id != NULL); |
936 | #if VERBOSE | ||
937 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started daemon %llu out of %llu\n", | 878 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Started daemon %llu out of %llu\n", |
938 | (num_peers - peers_left) + 1, num_peers); | 879 | (num_peers - peers_left) + 1, num_peers); |
939 | #endif | ||
940 | GNUNET_assert (GNUNET_SYSERR != | 880 | GNUNET_assert (GNUNET_SYSERR != |
941 | GNUNET_CONTAINER_multihashmap_put (peer_daemon_hash, | 881 | GNUNET_CONTAINER_multihashmap_put (peer_daemon_hash, |
942 | &id->hashPubKey, d, | 882 | &id->hashPubKey, d, |
@@ -953,10 +893,8 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
953 | 893 | ||
954 | if (peers_left == 0) | 894 | if (peers_left == 0) |
955 | { | 895 | { |
956 | #if VERBOSE | ||
957 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 896 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
958 | "All %d daemons started, now creating topology!\n", num_peers); | 897 | "All %d daemons started, now creating topology!\n", num_peers); |
959 | #endif | ||
960 | GNUNET_SCHEDULER_cancel (die_task); | 898 | GNUNET_SCHEDULER_cancel (die_task); |
961 | die_task = GNUNET_SCHEDULER_NO_TASK; | 899 | die_task = GNUNET_SCHEDULER_NO_TASK; |
962 | expected_connections = -1; | 900 | expected_connections = -1; |
@@ -967,10 +905,8 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
967 | connect_topology_option, | 905 | connect_topology_option, |
968 | connect_topology_option_modifier, | 906 | connect_topology_option_modifier, |
969 | TIMEOUT, 12, NULL, NULL); | 907 | TIMEOUT, 12, NULL, NULL); |
970 | #if VERBOSE | ||
971 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Have %d expected connections\n", | 908 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Have %d expected connections\n", |
972 | expected_connections); | 909 | expected_connections); |
973 | #endif | ||
974 | } | 910 | } |
975 | 911 | ||
976 | if (expected_connections == GNUNET_SYSERR) | 912 | if (expected_connections == GNUNET_SYSERR) |
@@ -1009,17 +945,13 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
1009 | "Hostkey callback received error: %s\n", emsg); | 945 | "Hostkey callback received error: %s\n", emsg); |
1010 | } | 946 | } |
1011 | 947 | ||
1012 | #if VERBOSE | ||
1013 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Hostkey created for peer `%s'\n", | 948 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Hostkey created for peer `%s'\n", |
1014 | GNUNET_i2s (id)); | 949 | GNUNET_i2s (id)); |
1015 | #endif | ||
1016 | peers_left--; | 950 | peers_left--; |
1017 | if (peers_left == 0) | 951 | if (peers_left == 0) |
1018 | { | 952 | { |
1019 | #if VERBOSE | ||
1020 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 953 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1021 | "All %d hostkeys created, now creating topology!\n", num_peers); | 954 | "All %d hostkeys created, now creating topology!\n", num_peers); |
1022 | #endif | ||
1023 | if (GNUNET_SCHEDULER_NO_TASK != die_task) | 955 | if (GNUNET_SCHEDULER_NO_TASK != die_task) |
1024 | { | 956 | { |
1025 | GNUNET_SCHEDULER_cancel (die_task); | 957 | GNUNET_SCHEDULER_cancel (die_task); |
@@ -1031,10 +963,8 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
1031 | (pg, topology, blacklist_topology, | 963 | (pg, topology, blacklist_topology, |
1032 | blacklist_transports) != GNUNET_SYSERR) | 964 | blacklist_transports) != GNUNET_SYSERR) |
1033 | { | 965 | { |
1034 | #if VERBOSE | ||
1035 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 966 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1036 | "Topology set up, now starting peers!\n"); | 967 | "Topology set up, now starting peers!\n"); |
1037 | #endif | ||
1038 | GNUNET_TESTING_daemons_continue_startup (pg); | 968 | GNUNET_TESTING_daemons_continue_startup (pg); |
1039 | /* Set up task in case topology creation doesn't finish | 969 | /* Set up task in case topology creation doesn't finish |
1040 | * within a reasonable amount of time */ | 970 | * within a reasonable amount of time */ |
@@ -1070,11 +1000,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1070 | FPRINTF (dotOutFile, "%s", "strict graph G {\n"); | 1000 | FPRINTF (dotOutFile, "%s", "strict graph G {\n"); |
1071 | } | 1001 | } |
1072 | 1002 | ||
1073 | #if VERBOSE | ||
1074 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1003 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1075 | "Starting daemons based on config file %s\n", cfgfile); | 1004 | "Starting daemons based on config file %s\n", cfgfile); |
1076 | #endif | ||
1077 | |||
1078 | if (GNUNET_YES != | 1005 | if (GNUNET_YES != |
1079 | GNUNET_CONFIGURATION_get_value_string (cfg, "paths", "servicehome", | 1006 | GNUNET_CONFIGURATION_get_value_string (cfg, "paths", "servicehome", |
1080 | &test_directory)) | 1007 | &test_directory)) |
@@ -1198,9 +1125,6 @@ check () | |||
1198 | char *const argv[] = { "test-transport-dv", | 1125 | char *const argv[] = { "test-transport-dv", |
1199 | "-c", | 1126 | "-c", |
1200 | "test_transport_dv_data.conf", | 1127 | "test_transport_dv_data.conf", |
1201 | #if VERBOSE | ||
1202 | "-L", "DEBUG", | ||
1203 | #endif | ||
1204 | NULL | 1128 | NULL |
1205 | }; | 1129 | }; |
1206 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 1130 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
@@ -1223,11 +1147,7 @@ main (int argc, char *argv[]) | |||
1223 | int ret; | 1147 | int ret; |
1224 | 1148 | ||
1225 | GNUNET_log_setup ("test-transport-dv", | 1149 | GNUNET_log_setup ("test-transport-dv", |
1226 | #if VERBOSE | ||
1227 | "DEBUG", | ||
1228 | #else | ||
1229 | "WARNING", | 1150 | "WARNING", |
1230 | #endif | ||
1231 | NULL); | 1151 | NULL); |
1232 | ret = check (); | 1152 | ret = check (); |
1233 | /** | 1153 | /** |
diff --git a/src/dv/test_transport_dv_data.conf b/src/dv/test_transport_dv_data.conf index 3daa6a7f4..8232461e5 100644 --- a/src/dv/test_transport_dv_data.conf +++ b/src/dv/test_transport_dv_data.conf | |||
@@ -5,7 +5,6 @@ SERVICEHOME = /tmp/test-gnunet-dv-testing/ | |||
5 | PORT = 2564 | 5 | PORT = 2564 |
6 | 6 | ||
7 | [transport] | 7 | [transport] |
8 | DEBUG = YES | ||
9 | PORT = 2565 | 8 | PORT = 2565 |
10 | PLUGINS = tcp dv | 9 | PLUGINS = tcp dv |
11 | BLACKLIST_FILE = $SERVICEHOME/blacklist | 10 | BLACKLIST_FILE = $SERVICEHOME/blacklist |
@@ -34,7 +33,6 @@ PORT = 2570 | |||
34 | 33 | ||
35 | [dv] | 34 | [dv] |
36 | AUTOSTART = YES | 35 | AUTOSTART = YES |
37 | DEBUG = NO | ||
38 | ACCEPT_FROM6 = ::1; | 36 | ACCEPT_FROM6 = ::1; |
39 | ACCEPT_FROM = 127.0.0.1; | 37 | ACCEPT_FROM = 127.0.0.1; |
40 | BINARY = gnunet-service-dv | 38 | BINARY = gnunet-service-dv |
@@ -45,7 +43,6 @@ PORT = 2571 | |||
45 | [testing] | 43 | [testing] |
46 | NUM_PEERS = 3 | 44 | NUM_PEERS = 3 |
47 | ADDITIONAL_MESSAGES = 10 | 45 | ADDITIONAL_MESSAGES = 10 |
48 | DEBUG = NO | ||
49 | WEAKRANDOM = YES | 46 | WEAKRANDOM = YES |
50 | TOPOLOGY = CLIQUE | 47 | TOPOLOGY = CLIQUE |
51 | CONNECT_TOPOLOGY = LINE | 48 | CONNECT_TOPOLOGY = LINE |
diff --git a/src/fragmentation/test_fragmentation.c b/src/fragmentation/test_fragmentation.c index ecbcdddab..2a30d7d93 100644 --- a/src/fragmentation/test_fragmentation.c +++ b/src/fragmentation/test_fragmentation.c | |||
@@ -25,8 +25,6 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_fragmentation_lib.h" | 26 | #include "gnunet_fragmentation_lib.h" |
27 | 27 | ||
28 | #define VERBOSE GNUNET_NO | ||
29 | |||
30 | #define DETAILS GNUNET_NO | 28 | #define DETAILS GNUNET_NO |
31 | 29 | ||
32 | /** | 30 | /** |
@@ -234,21 +232,13 @@ main (int argc, char *argv[]) | |||
234 | "-c", | 232 | "-c", |
235 | "test_fragmentation_data.conf", | 233 | "test_fragmentation_data.conf", |
236 | "-L", | 234 | "-L", |
237 | #if VERBOSE | ||
238 | "DEBUG", | ||
239 | #else | ||
240 | "WARNING", | 235 | "WARNING", |
241 | #endif | ||
242 | NULL | 236 | NULL |
243 | }; | 237 | }; |
244 | unsigned int i; | 238 | unsigned int i; |
245 | 239 | ||
246 | GNUNET_log_setup ("test-fragmentation", | 240 | GNUNET_log_setup ("test-fragmentation", |
247 | #if VERBOSE | ||
248 | "DEBUG", | ||
249 | #else | ||
250 | "WARNING", | 241 | "WARNING", |
251 | #endif | ||
252 | NULL); | 242 | NULL); |
253 | for (i = 0; i < NUM_MSGS; i++) | 243 | for (i = 0; i < NUM_MSGS; i++) |
254 | GNUNET_BANDWIDTH_tracker_init (&trackers[i], | 244 | GNUNET_BANDWIDTH_tracker_init (&trackers[i], |
diff --git a/src/fs/fs.conf.in b/src/fs/fs.conf.in index 007b0fd41..52bb52f5a 100644 --- a/src/fs/fs.conf.in +++ b/src/fs/fs.conf.in | |||
@@ -30,7 +30,6 @@ UNIX_MATCH_UID = NO | |||
30 | 30 | ||
31 | # Do we require users that want to access file-sharing to be in the 'gnunet' group? | 31 | # Do we require users that want to access file-sharing to be in the 'gnunet' group? |
32 | UNIX_MATCH_GID = YES | 32 | UNIX_MATCH_GID = YES |
33 | # DEBUG = YES | ||
34 | 33 | ||
35 | # Maximum number of requests this peer tracks (important for | 34 | # Maximum number of requests this peer tracks (important for |
36 | # memory consumption; 2k RAM/request is not unusual) | 35 | # memory consumption; 2k RAM/request is not unusual) |
diff --git a/src/fs/gnunet-auto-share.c b/src/fs/gnunet-auto-share.c index 073b768db..e0514bc8f 100644 --- a/src/fs/gnunet-auto-share.c +++ b/src/fs/gnunet-auto-share.c | |||
@@ -788,6 +788,7 @@ main (int argc, char *const *argv) | |||
788 | sigpipe = NULL; | 788 | sigpipe = NULL; |
789 | GNUNET_free (cfg_filename); | 789 | GNUNET_free (cfg_filename); |
790 | cfg_filename = NULL; | 790 | cfg_filename = NULL; |
791 | GNUNET_free ((void*) argv); | ||
791 | return ok; | 792 | return ok; |
792 | } | 793 | } |
793 | 794 | ||
diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c index 4122cb154..2f25e282e 100644 --- a/src/fs/gnunet-directory.c +++ b/src/fs/gnunet-directory.c | |||
@@ -177,11 +177,13 @@ main (int argc, char *const *argv) | |||
177 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 177 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
178 | return 2; | 178 | return 2; |
179 | 179 | ||
180 | return (GNUNET_OK == | 180 | ret = (GNUNET_OK == |
181 | GNUNET_PROGRAM_run (argc, argv, "gnunet-directory [OPTIONS] FILENAME", | 181 | GNUNET_PROGRAM_run (argc, argv, "gnunet-directory [OPTIONS] FILENAME", |
182 | gettext_noop | 182 | gettext_noop |
183 | ("Display contents of a GNUnet directory"), | 183 | ("Display contents of a GNUnet directory"), |
184 | options, &run, NULL)) ? ret : 1; | 184 | options, &run, NULL)) ? ret : 1; |
185 | GNUNET_free ((void*) argv); | ||
186 | return ret; | ||
185 | } | 187 | } |
186 | 188 | ||
187 | /* end of gnunet-directory.c */ | 189 | /* end of gnunet-directory.c */ |
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index 093dd7bdc..04edc66c8 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c | |||
@@ -333,11 +333,13 @@ main (int argc, char *const *argv) | |||
333 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 333 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
334 | return 2; | 334 | return 2; |
335 | 335 | ||
336 | return (GNUNET_OK == | 336 | ret = (GNUNET_OK == |
337 | GNUNET_PROGRAM_run (argc, argv, "gnunet-download [OPTIONS] URI", | 337 | GNUNET_PROGRAM_run (argc, argv, "gnunet-download [OPTIONS] URI", |
338 | gettext_noop | 338 | gettext_noop |
339 | ("Download files from GNUnet using a GNUnet CHK or LOC URI (gnunet://fs/chk/...)"), | 339 | ("Download files from GNUnet using a GNUnet CHK or LOC URI (gnunet://fs/chk/...)"), |
340 | options, &run, NULL)) ? ret : 1; | 340 | options, &run, NULL)) ? ret : 1; |
341 | GNUNET_free ((void*) argv); | ||
342 | return ret; | ||
341 | } | 343 | } |
342 | 344 | ||
343 | /* end of gnunet-download.c */ | 345 | /* end of gnunet-download.c */ |
diff --git a/src/fs/gnunet-fs.c b/src/fs/gnunet-fs.c index ce6284aa4..1d791377c 100644 --- a/src/fs/gnunet-fs.c +++ b/src/fs/gnunet-fs.c | |||
@@ -122,11 +122,12 @@ main (int argc, char *const *argv) | |||
122 | 122 | ||
123 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 123 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
124 | return 2; | 124 | return 2; |
125 | 125 | ret = (GNUNET_OK == | |
126 | return (GNUNET_OK == | 126 | GNUNET_PROGRAM_run (argc, argv, "gnunet-fs [OPTIONS]", |
127 | GNUNET_PROGRAM_run (argc, argv, "gnunet-fs [OPTIONS]", | 127 | gettext_noop ("Special file-sharing operations"), |
128 | gettext_noop ("Special file-sharing operations"), | 128 | options, &run, NULL)) ? ret : 1; |
129 | options, &run, NULL)) ? ret : 1; | 129 | GNUNET_free ((void*) argv); |
130 | return ret; | ||
130 | } | 131 | } |
131 | 132 | ||
132 | /* end of gnunet-fs.c */ | 133 | /* end of gnunet-fs.c */ |
diff --git a/src/fs/gnunet-helper-fs-publish.c b/src/fs/gnunet-helper-fs-publish.c index 8df53a6c3..d429f603d 100644 --- a/src/fs/gnunet-helper-fs-publish.c +++ b/src/fs/gnunet-helper-fs-publish.c | |||
@@ -364,8 +364,7 @@ extract_files (struct ScanTreeNode *item) | |||
364 | 364 | ||
365 | /* this is the expensive operation, *afterwards* we'll check for aborts */ | 365 | /* this is the expensive operation, *afterwards* we'll check for aborts */ |
366 | meta = GNUNET_CONTAINER_meta_data_create (); | 366 | meta = GNUNET_CONTAINER_meta_data_create (); |
367 | if (NULL != plugins) | 367 | EXTRACTOR_extract (plugins, item->filename, NULL, 0, &add_to_md, meta); |
368 | EXTRACTOR_extract (plugins, item->filename, NULL, 0, &add_to_md, meta); | ||
369 | slen = strlen (item->filename) + 1; | 368 | slen = strlen (item->filename) + 1; |
370 | size = GNUNET_CONTAINER_meta_data_get_serialized_size (meta); | 369 | size = GNUNET_CONTAINER_meta_data_get_serialized_size (meta); |
371 | if (-1 == size) | 370 | if (-1 == size) |
@@ -462,6 +461,7 @@ int main(int argc, | |||
462 | FPRINTF (stderr, | 461 | FPRINTF (stderr, |
463 | "%s", | 462 | "%s", |
464 | "gnunet-helper-fs-publish needs exactly one or two arguments\n"); | 463 | "gnunet-helper-fs-publish needs exactly one or two arguments\n"); |
464 | GNUNET_free ((void*) argv); | ||
465 | return 1; | 465 | return 1; |
466 | } | 466 | } |
467 | filename_expanded = argv[1]; | 467 | filename_expanded = argv[1]; |
@@ -480,13 +480,19 @@ int main(int argc, | |||
480 | &root)) | 480 | &root)) |
481 | { | 481 | { |
482 | (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0); | 482 | (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0); |
483 | EXTRACTOR_plugin_remove_all (plugins); | ||
484 | GNUNET_free ((void*) argv); | ||
483 | return 2; | 485 | return 2; |
484 | } | 486 | } |
485 | /* signal that we're done counting files, so that a percentage of | 487 | /* signal that we're done counting files, so that a percentage of |
486 | progress can now be calculated */ | 488 | progress can now be calculated */ |
487 | if (GNUNET_OK != | 489 | if (GNUNET_OK != |
488 | write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE, NULL, 0)) | 490 | write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE, NULL, 0)) |
491 | { | ||
492 | EXTRACTOR_plugin_remove_all (plugins); | ||
493 | GNUNET_free ((void*) argv); | ||
489 | return 3; | 494 | return 3; |
495 | } | ||
490 | if (NULL != root) | 496 | if (NULL != root) |
491 | { | 497 | { |
492 | if (GNUNET_OK != | 498 | if (GNUNET_OK != |
@@ -494,15 +500,16 @@ int main(int argc, | |||
494 | { | 500 | { |
495 | (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0); | 501 | (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0); |
496 | free_tree (root); | 502 | free_tree (root); |
503 | EXTRACTOR_plugin_remove_all (plugins); | ||
504 | GNUNET_free ((void*) argv); | ||
497 | return 4; | 505 | return 4; |
498 | } | 506 | } |
499 | free_tree (root); | 507 | free_tree (root); |
500 | } | 508 | } |
501 | /* enable "clean" shutdown by telling parent that we are done */ | 509 | /* enable "clean" shutdown by telling parent that we are done */ |
502 | (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED, NULL, 0); | 510 | (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED, NULL, 0); |
503 | if (NULL != plugins) | 511 | EXTRACTOR_plugin_remove_all (plugins); |
504 | EXTRACTOR_plugin_remove_all (plugins); | 512 | GNUNET_free ((void*) argv); |
505 | |||
506 | return 0; | 513 | return 0; |
507 | } | 514 | } |
508 | 515 | ||
diff --git a/src/fs/gnunet-pseudonym.c b/src/fs/gnunet-pseudonym.c index 02b71b513..a692917da 100644 --- a/src/fs/gnunet-pseudonym.c +++ b/src/fs/gnunet-pseudonym.c | |||
@@ -317,10 +317,12 @@ main (int argc, char *const *argv) | |||
317 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 317 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
318 | return 2; | 318 | return 2; |
319 | 319 | ||
320 | return (GNUNET_OK == | 320 | ret = (GNUNET_OK == |
321 | GNUNET_PROGRAM_run (argc, argv, "gnunet-pseudonym [OPTIONS]", | 321 | GNUNET_PROGRAM_run (argc, argv, "gnunet-pseudonym [OPTIONS]", |
322 | gettext_noop ("Manage GNUnet pseudonyms."), | 322 | gettext_noop ("Manage GNUnet pseudonyms."), |
323 | options, &run, NULL)) ? ret : 1; | 323 | options, &run, NULL)) ? ret : 1; |
324 | GNUNET_free ((void*) argv); | ||
325 | return ret; | ||
324 | } | 326 | } |
325 | 327 | ||
326 | /* end of gnunet-pseudonym.c */ | 328 | /* end of gnunet-pseudonym.c */ |
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index eb64cc4cc..dbbdfda8c 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -734,19 +734,18 @@ main (int argc, char *const *argv) | |||
734 | 0, &GNUNET_GETOPT_set_one, &verbose}, | 734 | 0, &GNUNET_GETOPT_set_one, &verbose}, |
735 | GNUNET_GETOPT_OPTION_END | 735 | GNUNET_GETOPT_OPTION_END |
736 | }; | 736 | }; |
737 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
738 | "GNUnet publish starts\n"); | ||
739 | bo.expiration_time = | 737 | bo.expiration_time = |
740 | GNUNET_FS_year_to_time (GNUNET_FS_get_current_year () + 2); | 738 | GNUNET_FS_year_to_time (GNUNET_FS_get_current_year () + 2); |
741 | 739 | ||
742 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 740 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
743 | return 2; | 741 | return 2; |
744 | 742 | ret = (GNUNET_OK == | |
745 | return (GNUNET_OK == | 743 | GNUNET_PROGRAM_run (argc, argv, "gnunet-publish [OPTIONS] FILENAME", |
746 | GNUNET_PROGRAM_run (argc, argv, "gnunet-publish [OPTIONS] FILENAME", | 744 | gettext_noop |
747 | gettext_noop | 745 | ("Publish a file or directory on GNUnet"), |
748 | ("Publish a file or directory on GNUnet"), | 746 | options, &run, NULL)) ? ret : 1; |
749 | options, &run, NULL)) ? ret : 1; | 747 | GNUNET_free ((void*) argv); |
748 | return ret; | ||
750 | } | 749 | } |
751 | 750 | ||
752 | /* end of gnunet-publish.c */ | 751 | /* end of gnunet-publish.c */ |
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index 200dc77ab..e90b761d7 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c | |||
@@ -303,11 +303,13 @@ main (int argc, char *const *argv) | |||
303 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 303 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
304 | return 2; | 304 | return 2; |
305 | 305 | ||
306 | return (GNUNET_OK == | 306 | ret = (GNUNET_OK == |
307 | GNUNET_PROGRAM_run (argc, argv, "gnunet-search [OPTIONS] KEYWORD", | 307 | GNUNET_PROGRAM_run (argc, argv, "gnunet-search [OPTIONS] KEYWORD", |
308 | gettext_noop | 308 | gettext_noop |
309 | ("Search GNUnet for files that were published on GNUnet"), | 309 | ("Search GNUnet for files that were published on GNUnet"), |
310 | options, &run, NULL)) ? ret : 1; | 310 | options, &run, NULL)) ? ret : 1; |
311 | GNUNET_free ((void*) argv); | ||
312 | return ret; | ||
311 | } | 313 | } |
312 | 314 | ||
313 | /* end of gnunet-search.c */ | 315 | /* end of gnunet-search.c */ |
diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c index be16e9100..094d8868d 100644 --- a/src/fs/gnunet-unindex.c +++ b/src/fs/gnunet-unindex.c | |||
@@ -173,11 +173,13 @@ main (int argc, char *const *argv) | |||
173 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 173 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
174 | return 2; | 174 | return 2; |
175 | 175 | ||
176 | return (GNUNET_OK == | 176 | ret = (GNUNET_OK == |
177 | GNUNET_PROGRAM_run (argc, argv, "gnunet-unindex [OPTIONS] FILENAME", | 177 | GNUNET_PROGRAM_run (argc, argv, "gnunet-unindex [OPTIONS] FILENAME", |
178 | gettext_noop | 178 | gettext_noop |
179 | ("Unindex a file that was previously indexed with gnunet-publish."), | 179 | ("Unindex a file that was previously indexed with gnunet-publish."), |
180 | options, &run, NULL)) ? ret : 1; | 180 | options, &run, NULL)) ? ret : 1; |
181 | GNUNET_free ((void*) argv); | ||
182 | return ret; | ||
181 | } | 183 | } |
182 | 184 | ||
183 | /* end of gnunet-unindex.c */ | 185 | /* end of gnunet-unindex.c */ |
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c index 4954e3b4c..5329e4917 100644 --- a/src/gns/gnunet-dns2gns.c +++ b/src/gns/gnunet-dns2gns.c | |||
@@ -692,7 +692,7 @@ main (int argc, | |||
692 | _("GNUnet DNS-to-GNS proxy (a DNS server)"), | 692 | _("GNUnet DNS-to-GNS proxy (a DNS server)"), |
693 | options, | 693 | options, |
694 | &run, NULL)) ? 0 : 1; | 694 | &run, NULL)) ? 0 : 1; |
695 | 695 | GNUNET_free ((void*) argv); | |
696 | return ret; | 696 | return ret; |
697 | } | 697 | } |
698 | 698 | ||
diff --git a/src/gns/gnunet-gns-fcfsd.c b/src/gns/gnunet-gns-fcfsd.c index 5503000ac..c29c7838a 100644 --- a/src/gns/gnunet-gns-fcfsd.c +++ b/src/gns/gnunet-gns-fcfsd.c | |||
@@ -970,7 +970,7 @@ main (int argc, char *const *argv) | |||
970 | _("GNUnet GNS first come first serve registration service"), | 970 | _("GNUnet GNS first come first serve registration service"), |
971 | options, | 971 | options, |
972 | &run, NULL)) ? 0 : 1; | 972 | &run, NULL)) ? 0 : 1; |
973 | 973 | GNUNET_free ((void*) argv); | |
974 | return ret; | 974 | return ret; |
975 | } | 975 | } |
976 | 976 | ||
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c index ba30b56fb..d7e8309dd 100644 --- a/src/gns/gnunet-gns.c +++ b/src/gns/gnunet-gns.c | |||
@@ -381,7 +381,7 @@ main (int argc, char *const *argv) | |||
381 | _("GNUnet GNS access tool"), | 381 | _("GNUnet GNS access tool"), |
382 | options, | 382 | options, |
383 | &run, NULL)) ? 0 : 1; | 383 | &run, NULL)) ? 0 : 1; |
384 | 384 | GNUNET_free ((void*) argv); | |
385 | return ret; | 385 | return ret; |
386 | } | 386 | } |
387 | 387 | ||
diff --git a/src/gns/test_gns_dht_default.conf b/src/gns/test_gns_dht_default.conf index b22f002fb..a14588c41 100644 --- a/src/gns/test_gns_dht_default.conf +++ b/src/gns/test_gns_dht_default.conf | |||
@@ -7,7 +7,6 @@ PORT = 22568 | |||
7 | 7 | ||
8 | [dht] | 8 | [dht] |
9 | UNIXPATH = /tmp/gnunet-service-dht.sock | 9 | UNIXPATH = /tmp/gnunet-service-dht.sock |
10 | DEBUG = NO | ||
11 | AUTOSTART = YES | 10 | AUTOSTART = YES |
12 | ACCEPT_FROM6 = ::1; | 11 | ACCEPT_FROM6 = ::1; |
13 | ACCEPT_FROM = 127.0.0.1; | 12 | ACCEPT_FROM = 127.0.0.1; |
diff --git a/src/gns/test_gns_simple_lookup.conf b/src/gns/test_gns_simple_lookup.conf index ca1699c2f..f759ba448 100644 --- a/src/gns/test_gns_simple_lookup.conf +++ b/src/gns/test_gns_simple_lookup.conf | |||
@@ -7,7 +7,6 @@ AUTOSTART = YES | |||
7 | HOSTNAME = localhost | 7 | HOSTNAME = localhost |
8 | 8 | ||
9 | [dht] | 9 | [dht] |
10 | DEBUG = NO | ||
11 | AUTOSTART = YES | 10 | AUTOSTART = YES |
12 | ACCEPT_FROM6 = ::1; | 11 | ACCEPT_FROM6 = ::1; |
13 | ACCEPT_FROM = 127.0.0.1; | 12 | ACCEPT_FROM = 127.0.0.1; |
@@ -24,7 +23,6 @@ DATABASE = sqlite | |||
24 | 23 | ||
25 | [transport] | 24 | [transport] |
26 | PLUGINS = tcp | 25 | PLUGINS = tcp |
27 | DEBUG = NO | ||
28 | ACCEPT_FROM6 = ::1; | 26 | ACCEPT_FROM6 = ::1; |
29 | ACCEPT_FROM = 127.0.0.1; | 27 | ACCEPT_FROM = 127.0.0.1; |
30 | NEIGHBOUR_LIMIT = 50 | 28 | NEIGHBOUR_LIMIT = 50 |
@@ -40,7 +38,6 @@ PORT = 12092 | |||
40 | [arm] | 38 | [arm] |
41 | DEFAULTSERVICES = core dht namestore gns | 39 | DEFAULTSERVICES = core dht namestore gns |
42 | PORT = 12366 | 40 | PORT = 12366 |
43 | DEBUG = NO | ||
44 | 41 | ||
45 | [transport-tcp] | 42 | [transport-tcp] |
46 | TIMEOUT = 300 s | 43 | TIMEOUT = 300 s |
diff --git a/src/gns/w32nsp-resolve.c b/src/gns/w32nsp-resolve.c index 4a116f594..3234a1ee5 100644 --- a/src/gns/w32nsp-resolve.c +++ b/src/gns/w32nsp-resolve.c | |||
@@ -57,7 +57,8 @@ DEFINE_GUID(SVCID_INET_HOSTADDRBYNAME, 0x0002a803, 0x0000, 0x0000, 0xc0, 0x00, 0 | |||
57 | // to convert structures returned as BLOBs. | 57 | // to convert structures returned as BLOBs. |
58 | // | 58 | // |
59 | 59 | ||
60 | VOID FixList(PCHAR ** List, PCHAR Base) | 60 | VOID |
61 | FixList(PCHAR ** List, PCHAR Base) | ||
61 | { | 62 | { |
62 | if(*List) | 63 | if(*List) |
63 | { | 64 | { |
@@ -77,7 +78,8 @@ VOID FixList(PCHAR ** List, PCHAR Base) | |||
77 | // Routine to convert a hostent returned in a BLOB to one with | 78 | // Routine to convert a hostent returned in a BLOB to one with |
78 | // usable pointers. The structure is converted in-place. | 79 | // usable pointers. The structure is converted in-place. |
79 | // | 80 | // |
80 | VOID UnpackHostEnt(struct hostent * hostent) | 81 | VOID |
82 | UnpackHostEnt(struct hostent * hostent) | ||
81 | { | 83 | { |
82 | PCHAR pch; | 84 | PCHAR pch; |
83 | 85 | ||
@@ -91,13 +93,15 @@ VOID UnpackHostEnt(struct hostent * hostent) | |||
91 | FixList(&hostent->h_addr_list, pch); | 93 | FixList(&hostent->h_addr_list, pch); |
92 | } | 94 | } |
93 | 95 | ||
94 | void | 96 | |
97 | static void | ||
95 | print_hostent (struct hostent *he) | 98 | print_hostent (struct hostent *he) |
96 | { | 99 | { |
97 | int i; | 100 | int i; |
98 | char **pAlias; | 101 | char **pAlias; |
102 | |||
99 | printf("\tOfficial name: %s\n", he->h_name); | 103 | printf("\tOfficial name: %s\n", he->h_name); |
100 | for (pAlias = he->h_aliases; *pAlias != 0; pAlias++) { | 104 | for (i=0, pAlias = he->h_aliases; *pAlias != 0; pAlias++) { |
101 | printf("\tAlternate name #%d: %s\n", ++i, *pAlias); | 105 | printf("\tAlternate name #%d: %s\n", ++i, *pAlias); |
102 | } | 106 | } |
103 | printf("\tAddress type: "); | 107 | printf("\tAddress type: "); |
@@ -150,6 +154,7 @@ print_hostent (struct hostent *he) | |||
150 | } | 154 | } |
151 | } | 155 | } |
152 | 156 | ||
157 | |||
153 | int | 158 | int |
154 | main (int argc, char **argv) | 159 | main (int argc, char **argv) |
155 | { | 160 | { |
diff --git a/src/hello/gnunet-hello.c b/src/hello/gnunet-hello.c index bc35cdd32..eae16a90b 100644 --- a/src/hello/gnunet-hello.c +++ b/src/hello/gnunet-hello.c | |||
@@ -25,10 +25,6 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_hello_lib.h" | 26 | #include "gnunet_hello_lib.h" |
27 | 27 | ||
28 | #define DEBUG GNUNET_EXTRA_LOGGING | ||
29 | |||
30 | #define VERBOSE GNUNET_NO | ||
31 | |||
32 | /** | 28 | /** |
33 | * Closure for 'add_to_buf'. | 29 | * Closure for 'add_to_buf'. |
34 | */ | 30 | */ |
diff --git a/src/hello/test_hello.c b/src/hello/test_hello.c index bdabc72ea..ac482efe5 100644 --- a/src/hello/test_hello.c +++ b/src/hello/test_hello.c | |||
@@ -25,11 +25,6 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_hello_lib.h" | 26 | #include "gnunet_hello_lib.h" |
27 | 27 | ||
28 | #define DEBUG GNUNET_NO | ||
29 | |||
30 | #define VERBOSE GNUNET_NO | ||
31 | |||
32 | |||
33 | static size_t | 28 | static size_t |
34 | my_addr_gen (void *cls, size_t max, void *buf) | 29 | my_addr_gen (void *cls, size_t max, void *buf) |
35 | { | 30 | { |
@@ -37,9 +32,8 @@ my_addr_gen (void *cls, size_t max, void *buf) | |||
37 | size_t ret; | 32 | size_t ret; |
38 | struct GNUNET_HELLO_Address address; | 33 | struct GNUNET_HELLO_Address address; |
39 | 34 | ||
40 | #if DEBUG | 35 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
41 | FPRINTF (stderr, "DEBUG: my_addr_gen called with i = %d\n", *i); | 36 | "DEBUG: my_addr_gen called with i = %d\n", *i); |
42 | #endif | ||
43 | if (0 == *i) | 37 | if (0 == *i) |
44 | return 0; | 38 | return 0; |
45 | memset (&address.peer, 0, sizeof (struct GNUNET_PeerIdentity)); | 39 | memset (&address.peer, 0, sizeof (struct GNUNET_PeerIdentity)); |
@@ -60,10 +54,9 @@ check_addr (void *cls, const struct GNUNET_HELLO_Address *address, | |||
60 | { | 54 | { |
61 | unsigned int *i = cls; | 55 | unsigned int *i = cls; |
62 | 56 | ||
63 | #if DEBUG | 57 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
64 | FPRINTF (stderr, "DEBUG: check_addr called with i = %d and addrlen = %u\n", | 58 | "DEBUG: check_addr called with i = %d and addrlen = %u\n", |
65 | *i, (unsigned int) address->address_length); | 59 | *i, (unsigned int) address->address_length); |
66 | #endif | ||
67 | GNUNET_assert (address->address_length > 0); | 60 | GNUNET_assert (address->address_length > 0); |
68 | GNUNET_assert (*i & (1 << (address->address_length - 1))); | 61 | GNUNET_assert (*i & (1 << (address->address_length - 1))); |
69 | *i -= (1 << (address->address_length - 1)); | 62 | *i -= (1 << (address->address_length - 1)); |
@@ -81,10 +74,9 @@ remove_some (void *cls, const struct GNUNET_HELLO_Address *address, | |||
81 | { | 74 | { |
82 | unsigned int *i = cls; | 75 | unsigned int *i = cls; |
83 | 76 | ||
84 | #if DEBUG | 77 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
85 | FPRINTF (stderr, "DEBUG: remove_some called with i = %d and addrlen = %u\n", | 78 | "DEBUG: remove_some called with i = %d and addrlen = %u\n", |
86 | *i, (unsigned int) address->address_length); | 79 | *i, (unsigned int) address->address_length); |
87 | #endif | ||
88 | GNUNET_assert (address->address_length > 0); | 80 | GNUNET_assert (address->address_length > 0); |
89 | if (*i & (1 << (address->address_length - 1))) | 81 | if (*i & (1 << (address->address_length - 1))) |
90 | { | 82 | { |
@@ -109,65 +101,56 @@ main (int argc, char *argv[]) | |||
109 | GNUNET_log_setup ("test-hello", "DEBUG", NULL); | 101 | GNUNET_log_setup ("test-hello", "DEBUG", NULL); |
110 | startup_time = GNUNET_TIME_absolute_get (); | 102 | startup_time = GNUNET_TIME_absolute_get (); |
111 | memset (&publicKey, 42, sizeof (publicKey)); | 103 | memset (&publicKey, 42, sizeof (publicKey)); |
112 | #if VERBOSE | 104 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
113 | FPRINTF (stderr, "%s", "Testing HELLO creation (without addresses)...\n"); | 105 | "Testing HELLO creation (without addresses)...\n"); |
114 | #endif | ||
115 | i = 0; | 106 | i = 0; |
116 | msg1 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); | 107 | msg1 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); |
117 | GNUNET_assert (msg1 != NULL); | 108 | GNUNET_assert (msg1 != NULL); |
118 | GNUNET_assert (0 < GNUNET_HELLO_size (msg1)); | 109 | GNUNET_assert (0 < GNUNET_HELLO_size (msg1)); |
119 | 110 | ||
120 | #if VERBOSE | 111 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
121 | FPRINTF (stderr, "%s", "Testing address iteration (empty set)...\n"); | 112 | "Testing address iteration (empty set)...\n"); |
122 | #endif | ||
123 | GNUNET_assert (NULL == | 113 | GNUNET_assert (NULL == |
124 | GNUNET_HELLO_iterate_addresses (msg1, GNUNET_NO, &check_addr, | 114 | GNUNET_HELLO_iterate_addresses (msg1, GNUNET_NO, &check_addr, |
125 | &i)); | 115 | &i)); |
126 | 116 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, | |
127 | #if VERBOSE | 117 | "Testing HELLO creation (with one address)...\n"); |
128 | FPRINTF (stderr, "%s", "Testing HELLO creation (with one address)...\n"); | ||
129 | #endif | ||
130 | i = 1; | 118 | i = 1; |
131 | msg2 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); | 119 | msg2 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); |
132 | GNUNET_assert (msg2 != NULL); | 120 | GNUNET_assert (msg2 != NULL); |
133 | GNUNET_assert (GNUNET_HELLO_size (msg1) < GNUNET_HELLO_size (msg2)); | 121 | GNUNET_assert (GNUNET_HELLO_size (msg1) < GNUNET_HELLO_size (msg2)); |
134 | 122 | ||
135 | #if VERBOSE | 123 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
136 | FPRINTF (stderr, "%s", "Testing address iteration (one address)...\n"); | 124 | "Testing address iteration (one address)...\n"); |
137 | #endif | ||
138 | i = 1; | 125 | i = 1; |
139 | GNUNET_assert (NULL == | 126 | GNUNET_assert (NULL == |
140 | GNUNET_HELLO_iterate_addresses (msg2, GNUNET_NO, &check_addr, | 127 | GNUNET_HELLO_iterate_addresses (msg2, GNUNET_NO, &check_addr, |
141 | &i)); | 128 | &i)); |
142 | GNUNET_assert (i == 0); | 129 | GNUNET_assert (i == 0); |
143 | 130 | ||
144 | #if VERBOSE | 131 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
145 | FPRINTF (stderr, "%s", "Testing get_key from HELLO...\n"); | 132 | "Testing get_key from HELLO...\n"); |
146 | #endif | ||
147 | GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_key (msg2, &pk)); | 133 | GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_key (msg2, &pk)); |
148 | GNUNET_assert (0 == memcmp (&publicKey, &pk, sizeof (pk))); | 134 | GNUNET_assert (0 == memcmp (&publicKey, &pk, sizeof (pk))); |
149 | GNUNET_free (msg1); | 135 | GNUNET_free (msg1); |
150 | 136 | ||
151 | #if VERBOSE | 137 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
152 | FPRINTF (stderr, "%s", "Testing HELLO creation (with two addresses)...\n"); | 138 | "Testing HELLO creation (with two addresses)...\n"); |
153 | #endif | ||
154 | i = 2; | 139 | i = 2; |
155 | msg3 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); | 140 | msg3 = GNUNET_HELLO_create (&publicKey, &my_addr_gen, &i); |
156 | GNUNET_assert (msg3 != NULL); | 141 | GNUNET_assert (msg3 != NULL); |
157 | GNUNET_assert (GNUNET_HELLO_size (msg2) < GNUNET_HELLO_size (msg3)); | 142 | GNUNET_assert (GNUNET_HELLO_size (msg2) < GNUNET_HELLO_size (msg3)); |
158 | 143 | ||
159 | #if VERBOSE | 144 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
160 | FPRINTF (stderr, "%s", "Testing address iteration (two addresses)...\n"); | 145 | "Testing address iteration (two addresses)...\n"); |
161 | #endif | ||
162 | i = 3; | 146 | i = 3; |
163 | GNUNET_assert (NULL == | 147 | GNUNET_assert (NULL == |
164 | GNUNET_HELLO_iterate_addresses (msg3, GNUNET_NO, &check_addr, | 148 | GNUNET_HELLO_iterate_addresses (msg3, GNUNET_NO, &check_addr, |
165 | &i)); | 149 | &i)); |
166 | GNUNET_assert (i == 0); | 150 | GNUNET_assert (i == 0); |
167 | 151 | ||
168 | #if VERBOSE | 152 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
169 | FPRINTF (stderr, "%s", "Testing HELLO merge...\n"); | 153 | "Testing HELLO merge...\n"); |
170 | #endif | ||
171 | msg1 = GNUNET_HELLO_merge (msg2, msg3); | 154 | msg1 = GNUNET_HELLO_merge (msg2, msg3); |
172 | GNUNET_assert (GNUNET_HELLO_size (msg1) == GNUNET_HELLO_size (msg3)); | 155 | GNUNET_assert (GNUNET_HELLO_size (msg1) == GNUNET_HELLO_size (msg3)); |
173 | 156 | ||
@@ -178,9 +161,8 @@ main (int argc, char *argv[]) | |||
178 | GNUNET_assert (i == 0); | 161 | GNUNET_assert (i == 0); |
179 | GNUNET_free (msg1); | 162 | GNUNET_free (msg1); |
180 | 163 | ||
181 | #if VERBOSE | 164 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
182 | FPRINTF (stderr, "%s", "Testing address iteration to copy HELLO...\n"); | 165 | "Testing address iteration to copy HELLO...\n"); |
183 | #endif | ||
184 | i = 2; | 166 | i = 2; |
185 | msg1 = GNUNET_HELLO_iterate_addresses (msg3, GNUNET_YES, &remove_some, &i); | 167 | msg1 = GNUNET_HELLO_iterate_addresses (msg3, GNUNET_YES, &remove_some, &i); |
186 | GNUNET_assert (msg1 != NULL); | 168 | GNUNET_assert (msg1 != NULL); |
@@ -192,9 +174,8 @@ main (int argc, char *argv[]) | |||
192 | GNUNET_assert (i == 0); | 174 | GNUNET_assert (i == 0); |
193 | GNUNET_free (msg1); | 175 | GNUNET_free (msg1); |
194 | 176 | ||
195 | #if VERBOSE | 177 | GNUNTE_log (GNUNET_ERROR_TYPE_DEBUG, |
196 | FPRINTF (stderr, "%s", "Testing delta address iteration...\n"); | 178 | "Testing delta address iteration...\n"); |
197 | #endif | ||
198 | i = 2; | 179 | i = 2; |
199 | GNUNET_HELLO_iterate_new_addresses (msg3, msg2, startup_time, &check_addr, | 180 | GNUNET_HELLO_iterate_new_addresses (msg3, msg2, startup_time, &check_addr, |
200 | &i); | 181 | &i); |
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c index 6637f37ce..255f0d544 100644 --- a/src/hostlist/gnunet-daemon-hostlist.c +++ b/src/hostlist/gnunet-daemon-hostlist.c | |||
@@ -343,7 +343,7 @@ main (int argc, char *const *argv) | |||
343 | GNUNET_PROGRAM_run (argc, argv, "hostlist", | 343 | GNUNET_PROGRAM_run (argc, argv, "hostlist", |
344 | _("GNUnet hostlist server and client"), options, | 344 | _("GNUnet hostlist server and client"), options, |
345 | &run, NULL)) ? 0 : 1; | 345 | &run, NULL)) ? 0 : 1; |
346 | 346 | GNUNET_free ((void*) argv); | |
347 | return ret; | 347 | return ret; |
348 | } | 348 | } |
349 | 349 | ||
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf b/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf index c880190a1..0a345f6bf 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf +++ b/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf | |||
@@ -25,7 +25,6 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
25 | [transport] | 25 | [transport] |
26 | PORT = 12965 | 26 | PORT = 12965 |
27 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 27 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
28 | DEBUG = NO | ||
29 | 28 | ||
30 | [core] | 29 | [core] |
31 | PORT = 12970 | 30 | PORT = 12970 |
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index 63baced46..74ef37f16 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | |||
@@ -28,11 +28,6 @@ | |||
28 | #include "gnunet_arm_service.h" | 28 | #include "gnunet_arm_service.h" |
29 | #include "gnunet_transport_service.h" | 29 | #include "gnunet_transport_service.h" |
30 | 30 | ||
31 | #define VERBOSE GNUNET_NO | ||
32 | |||
33 | #define START_ARM GNUNET_YES | ||
34 | |||
35 | |||
36 | /** | 31 | /** |
37 | * How long until we give up on transmitting the message? | 32 | * How long until we give up on transmitting the message? |
38 | */ | 33 | */ |
@@ -48,9 +43,7 @@ struct PeerContext | |||
48 | struct GNUNET_TRANSPORT_Handle *th; | 43 | struct GNUNET_TRANSPORT_Handle *th; |
49 | struct GNUNET_MessageHeader *hello; | 44 | struct GNUNET_MessageHeader *hello; |
50 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; | 45 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; |
51 | #if START_ARM | ||
52 | struct GNUNET_OS_Process *arm_proc; | 46 | struct GNUNET_OS_Process *arm_proc; |
53 | #endif | ||
54 | }; | 47 | }; |
55 | 48 | ||
56 | static struct PeerContext p1; | 49 | static struct PeerContext p1; |
@@ -112,9 +105,6 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
112 | { | 105 | { |
113 | if (peer == NULL) | 106 | if (peer == NULL) |
114 | return; | 107 | return; |
115 | #if VERBOSE | ||
116 | FPRINTF (stderr, "Peer %s connected\n", GNUNET_i2s (peer)); | ||
117 | #endif | ||
118 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected, shutting down.\n"); | 108 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peers connected, shutting down.\n"); |
119 | ok = 0; | 109 | ok = 0; |
120 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK) | 110 | if (timeout_task != GNUNET_SCHEDULER_NO_TASK) |
@@ -145,12 +135,10 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
145 | 135 | ||
146 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); | 136 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); |
147 | p->cfg = GNUNET_CONFIGURATION_create (); | 137 | p->cfg = GNUNET_CONFIGURATION_create (); |
148 | #if START_ARM | ||
149 | p->arm_proc = | 138 | p->arm_proc = |
150 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, | 139 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, |
151 | "gnunet-service-arm", | 140 | "gnunet-service-arm", |
152 | "-c", cfgname, NULL); | 141 | "-c", cfgname, NULL); |
153 | #endif | ||
154 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 142 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
155 | p->th = | 143 | p->th = |
156 | GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, ¬ify_connect, NULL); | 144 | GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, ¬ify_connect, NULL); |
@@ -165,7 +153,6 @@ waitpid_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
165 | { | 153 | { |
166 | struct PeerContext *p = cls; | 154 | struct PeerContext *p = cls; |
167 | 155 | ||
168 | #if START_ARM | ||
169 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Killing ARM process.\n"); | 156 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Killing ARM process.\n"); |
170 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) | 157 | if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) |
171 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 158 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
@@ -175,7 +162,6 @@ waitpid_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
175 | GNUNET_OS_process_get_pid (p->arm_proc)); | 162 | GNUNET_OS_process_get_pid (p->arm_proc)); |
176 | GNUNET_OS_process_destroy (p->arm_proc); | 163 | GNUNET_OS_process_destroy (p->arm_proc); |
177 | p->arm_proc = NULL; | 164 | p->arm_proc = NULL; |
178 | #endif | ||
179 | GNUNET_CONFIGURATION_destroy (p->cfg); | 165 | GNUNET_CONFIGURATION_destroy (p->cfg); |
180 | } | 166 | } |
181 | 167 | ||
@@ -218,9 +204,6 @@ check () | |||
218 | { | 204 | { |
219 | char *const argv[] = { "test-gnunet-daemon-hostlist", | 205 | char *const argv[] = { "test-gnunet-daemon-hostlist", |
220 | "-c", "test_gnunet_daemon_hostlist_data.conf", | 206 | "-c", "test_gnunet_daemon_hostlist_data.conf", |
221 | #if VERBOSE | ||
222 | "-L", "DEBUG", | ||
223 | #endif | ||
224 | NULL | 207 | NULL |
225 | }; | 208 | }; |
226 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 209 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
@@ -244,11 +227,7 @@ main (int argc, char *argv[]) | |||
244 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2"); | 227 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2"); |
245 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-3"); | 228 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-3"); |
246 | GNUNET_log_setup ("test-gnunet-daemon-hostlist", | 229 | GNUNET_log_setup ("test-gnunet-daemon-hostlist", |
247 | #if VERBOSE | ||
248 | "DEBUG", | ||
249 | #else | ||
250 | "WARNING", | 230 | "WARNING", |
251 | #endif | ||
252 | NULL); | 231 | NULL); |
253 | ret = check (); | 232 | ret = check (); |
254 | if (ret == 0) | 233 | if (ret == 0) |
diff --git a/src/hostlist/test_hostlist_defaults.conf b/src/hostlist/test_hostlist_defaults.conf index d7383005c..fe3756a1e 100644 --- a/src/hostlist/test_hostlist_defaults.conf +++ b/src/hostlist/test_hostlist_defaults.conf | |||
@@ -67,4 +67,4 @@ AUTOSTART = NO | |||
67 | AUTOSTART = NO | 67 | AUTOSTART = NO |
68 | 68 | ||
69 | [nat] | 69 | [nat] |
70 | RETURN_LOCAL_ADDRESSES = YES \ No newline at end of file | 70 | RETURN_LOCAL_ADDRESSES = YES |
diff --git a/src/include/platform.h b/src/include/platform.h index 912601dad..c44f67f67 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Christian Grothoff (and other contributing authors) | 3 | (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2012 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -20,14 +20,12 @@ | |||
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file include/platform.h | 22 | * @file include/platform.h |
23 | * @brief plaform specifics | 23 | * @brief plaform specific includes and defines |
24 | * | ||
25 | * @author Nils Durner | 24 | * @author Nils Durner |
26 | * | 25 | * @author Christian Grothoff |
27 | * This file should never be included by installed | 26 | * This file should never be included by installed |
28 | * header files (thos starting with "gnunet_"). | 27 | * header files (those starting with "gnunet_"). |
29 | */ | 28 | */ |
30 | |||
31 | #ifndef PLATFORM_H | 29 | #ifndef PLATFORM_H |
32 | #define PLATFORM_H | 30 | #define PLATFORM_H |
33 | 31 | ||
@@ -141,7 +139,7 @@ | |||
141 | #ifdef SOMEBSD | 139 | #ifdef SOMEBSD |
142 | #include <net/if.h> | 140 | #include <net/if.h> |
143 | #endif | 141 | #endif |
144 | #ifdef GNUNET_freeBSD | 142 | #ifdef FREEBSD |
145 | #include <semaphore.h> | 143 | #include <semaphore.h> |
146 | #endif | 144 | #endif |
147 | #ifdef DARWIN | 145 | #ifdef DARWIN |
diff --git a/src/integration-tests/confs/c_no_nat_client.conf b/src/integration-tests/confs/c_no_nat_client.conf index 8d4c7e3e8..8e89f3f6e 100644 --- a/src/integration-tests/confs/c_no_nat_client.conf +++ b/src/integration-tests/confs/c_no_nat_client.conf | |||
@@ -140,7 +140,6 @@ ATS_MIN_INTERVAL = 15000 | |||
140 | ATS_EXEC_INTERVAL = 30000 | 140 | ATS_EXEC_INTERVAL = 30000 |
141 | 141 | ||
142 | [transport] | 142 | [transport] |
143 | #DEBUG = YES | ||
144 | #PREFIX = valgrind --alloc-fn=GNUNET_xmalloc_ --alloc-fn=GNUNET_xmalloc_unchecked_ --alloc-fn=GNUNET_xrealloc_ --alloc-fn=GNUNET_xgrow_ --massif-out-file=massif_client.out --tool=massif | 143 | #PREFIX = valgrind --alloc-fn=GNUNET_xmalloc_ --alloc-fn=GNUNET_xmalloc_unchecked_ --alloc-fn=GNUNET_xrealloc_ --alloc-fn=GNUNET_xgrow_ --massif-out-file=massif_client.out --tool=massif |
145 | AUTOSTART = YES | 144 | AUTOSTART = YES |
146 | PORT = 20029 | 145 | PORT = 20029 |
diff --git a/src/integration-tests/confs/c_no_nat_client_http.conf b/src/integration-tests/confs/c_no_nat_client_http.conf index 523a4fdcf..bbf6a64ec 100644 --- a/src/integration-tests/confs/c_no_nat_client_http.conf +++ b/src/integration-tests/confs/c_no_nat_client_http.conf | |||
@@ -141,7 +141,6 @@ ATS_EXEC_INTERVAL = 30000 | |||
141 | 141 | ||
142 | [transport] | 142 | [transport] |
143 | PREFIX = valgrind --leak-check=full | 143 | PREFIX = valgrind --leak-check=full |
144 | #DEBUG = YES | ||
145 | AUTOSTART = YES | 144 | AUTOSTART = YES |
146 | PORT = 20029 | 145 | PORT = 20029 |
147 | HOSTNAME = localhost | 146 | HOSTNAME = localhost |
diff --git a/src/integration-tests/confs/c_no_nat_client_unix.conf b/src/integration-tests/confs/c_no_nat_client_unix.conf index 62d679fd2..25373c927 100644 --- a/src/integration-tests/confs/c_no_nat_client_unix.conf +++ b/src/integration-tests/confs/c_no_nat_client_unix.conf | |||
@@ -141,7 +141,6 @@ ATS_EXEC_INTERVAL = 30000 | |||
141 | 141 | ||
142 | [transport] | 142 | [transport] |
143 | PREFIX = valgrind --leak-check=full | 143 | PREFIX = valgrind --leak-check=full |
144 | #DEBUG = YES | ||
145 | AUTOSTART = YES | 144 | AUTOSTART = YES |
146 | PORT = 20029 | 145 | PORT = 20029 |
147 | HOSTNAME = localhost | 146 | HOSTNAME = localhost |
diff --git a/src/integration-tests/connection_watchdog.c b/src/integration-tests/connection_watchdog.c index 17aab2159..0998a367e 100644 --- a/src/integration-tests/connection_watchdog.c +++ b/src/integration-tests/connection_watchdog.c | |||
@@ -1097,11 +1097,12 @@ main (int argc, char *const *argv) | |||
1097 | 1097 | ||
1098 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 1098 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
1099 | return 2; | 1099 | return 2; |
1100 | 1100 | ret = (GNUNET_OK == | |
1101 | return (GNUNET_OK == | 1101 | GNUNET_PROGRAM_run (argc, argv, "cn", |
1102 | GNUNET_PROGRAM_run (argc, argv, "cn", | 1102 | gettext_noop ("help text"), options, &run, |
1103 | gettext_noop ("help text"), options, &run, | 1103 | NULL)) ? ret : 1; |
1104 | NULL)) ? ret : 1; | 1104 | GNUNET_free ((void*) argv); |
1105 | return ret; | ||
1105 | } | 1106 | } |
1106 | 1107 | ||
1107 | /* end of connection_watchdog.c */ | 1108 | /* end of connection_watchdog.c */ |
diff --git a/src/lockmanager/test_lockmanager_api.conf b/src/lockmanager/test_lockmanager_api.conf index af0d99319..2be9caef1 100644 --- a/src/lockmanager/test_lockmanager_api.conf +++ b/src/lockmanager/test_lockmanager_api.conf | |||
@@ -1,5 +1,4 @@ | |||
1 | [lockmanager] | 1 | [lockmanager] |
2 | DEBUG = YES | ||
3 | AUTOSTART = NO | 2 | AUTOSTART = NO |
4 | PORT = 12112 | 3 | PORT = 12112 |
5 | ACCEPT_FROM = 127.0.0.1; | 4 | ACCEPT_FROM = 127.0.0.1; |
@@ -28,7 +27,6 @@ DATABASE = sqlite | |||
28 | 27 | ||
29 | [transport] | 28 | [transport] |
30 | PLUGINS = tcp | 29 | PLUGINS = tcp |
31 | DEBUG = NO | ||
32 | ACCEPT_FROM6 = ::1; | 30 | ACCEPT_FROM6 = ::1; |
33 | ACCEPT_FROM = 127.0.0.1; | 31 | ACCEPT_FROM = 127.0.0.1; |
34 | NEIGHBOUR_LIMIT = 50 | 32 | NEIGHBOUR_LIMIT = 50 |
@@ -44,7 +42,6 @@ PORT = 12092 | |||
44 | [arm] | 42 | [arm] |
45 | DEFAULTSERVICES = core lockmanager | 43 | DEFAULTSERVICES = core lockmanager |
46 | PORT = 12366 | 44 | PORT = 12366 |
47 | DEBUG = NO | ||
48 | 45 | ||
49 | [transport-tcp] | 46 | [transport-tcp] |
50 | TIMEOUT = 300 s | 47 | TIMEOUT = 300 s |
@@ -53,7 +50,6 @@ PORT = 12368 | |||
53 | [TESTING] | 50 | [TESTING] |
54 | NUM_PEERS = 5 | 51 | NUM_PEERS = 5 |
55 | WEAKRANDOM = YES | 52 | WEAKRANDOM = YES |
56 | DEBUG = YES | ||
57 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 53 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
58 | MAX_CONCURRENT_SSH = 10 | 54 | MAX_CONCURRENT_SSH = 10 |
59 | USE_PROGRESSBARS = YES | 55 | USE_PROGRESSBARS = YES |
diff --git a/src/mesh/gnunet-regex-profiler.c b/src/mesh/gnunet-regex-profiler.c index fac7b02e5..128ed905e 100644 --- a/src/mesh/gnunet-regex-profiler.c +++ b/src/mesh/gnunet-regex-profiler.c | |||
@@ -1872,6 +1872,7 @@ main (int argc, char *const *argv) | |||
1872 | GNUNET_PROGRAM_run (argc, argv, "gnunet-regex-profiler [OPTIONS] hosts-file policy-dir search-strings-file", | 1872 | GNUNET_PROGRAM_run (argc, argv, "gnunet-regex-profiler [OPTIONS] hosts-file policy-dir search-strings-file", |
1873 | _("Profiler for regex/mesh"), | 1873 | _("Profiler for regex/mesh"), |
1874 | options, &run, NULL); | 1874 | options, &run, NULL); |
1875 | GNUNET_free ((void*) argv); | ||
1875 | if (GNUNET_OK != ret) | 1876 | if (GNUNET_OK != ret) |
1876 | return ret; | 1877 | return ret; |
1877 | if (GNUNET_OK != result) | 1878 | if (GNUNET_OK != result) |
diff --git a/src/mesh/regex_profiler_test.conf b/src/mesh/regex_profiler_test.conf index ebbc9ee2f..938ea3cad 100644 --- a/src/mesh/regex_profiler_test.conf +++ b/src/mesh/regex_profiler_test.conf | |||
@@ -26,7 +26,6 @@ DISABLE_TRY_CONNECT = YES | |||
26 | [arm] | 26 | [arm] |
27 | DEFAULTSERVICES = core mesh dht statistics | 27 | DEFAULTSERVICES = core mesh dht statistics |
28 | PORT = 12003 | 28 | PORT = 12003 |
29 | DEBUG = NO | ||
30 | 29 | ||
31 | [fs] | 30 | [fs] |
32 | AUTOSTART = NO | 31 | AUTOSTART = NO |
@@ -40,7 +39,6 @@ plugins = dht mesh | |||
40 | [transport] | 39 | [transport] |
41 | AUTOSTART = YES | 40 | AUTOSTART = YES |
42 | PLUGINS = tcp | 41 | PLUGINS = tcp |
43 | DEBUG = NO | ||
44 | ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24; | 42 | ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24; |
45 | ACCEPT_FROM6 = ::1; | 43 | ACCEPT_FROM6 = ::1; |
46 | NEIGHBOUR_LIMIT = 50 | 44 | NEIGHBOUR_LIMIT = 50 |
@@ -67,7 +65,6 @@ ACCEPT_FROM = 127.0.0.1; 192.168.1.0/24; | |||
67 | [TESTING] | 65 | [TESTING] |
68 | NUM_PEERS = 5 | 66 | NUM_PEERS = 5 |
69 | WEAKRANDOM = YES | 67 | WEAKRANDOM = YES |
70 | DEBUG = YES | ||
71 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 68 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
72 | MAX_CONCURRENT_SSH = 10 | 69 | MAX_CONCURRENT_SSH = 10 |
73 | USE_PROGRESSBARS = YES | 70 | USE_PROGRESSBARS = YES |
diff --git a/src/mesh/test_mesh.conf b/src/mesh/test_mesh.conf index d8bdd7a13..8b9ca158e 100644 --- a/src/mesh/test_mesh.conf +++ b/src/mesh/test_mesh.conf | |||
@@ -5,7 +5,6 @@ AUTOSTART = NO | |||
5 | AUTOSTART = NO | 5 | AUTOSTART = NO |
6 | 6 | ||
7 | [mesh] | 7 | [mesh] |
8 | DEBUG = YES | ||
9 | AUTOSTART = YES | 8 | AUTOSTART = YES |
10 | ACCEPT_FROM = 127.0.0.1; | 9 | ACCEPT_FROM = 127.0.0.1; |
11 | HOSTNAME = localhost | 10 | HOSTNAME = localhost |
@@ -27,7 +26,6 @@ AUTOSTART = NO | |||
27 | PORT = 10012 | 26 | PORT = 10012 |
28 | 27 | ||
29 | [dht] | 28 | [dht] |
30 | DEBUG = NO | ||
31 | AUTOSTART = YES | 29 | AUTOSTART = YES |
32 | ACCEPT_FROM6 = ::1; | 30 | ACCEPT_FROM6 = ::1; |
33 | ACCEPT_FROM = 127.0.0.1; | 31 | ACCEPT_FROM = 127.0.0.1; |
@@ -43,7 +41,6 @@ DATABASE = sqlite | |||
43 | 41 | ||
44 | [transport] | 42 | [transport] |
45 | PLUGINS = tcp | 43 | PLUGINS = tcp |
46 | DEBUG = NO | ||
47 | ACCEPT_FROM6 = ::1; | 44 | ACCEPT_FROM6 = ::1; |
48 | ACCEPT_FROM = 127.0.0.1; | 45 | ACCEPT_FROM = 127.0.0.1; |
49 | NEIGHBOUR_LIMIT = 50 | 46 | NEIGHBOUR_LIMIT = 50 |
@@ -59,7 +56,6 @@ PORT = 12092 | |||
59 | [arm] | 56 | [arm] |
60 | DEFAULTSERVICES = core | 57 | DEFAULTSERVICES = core |
61 | PORT = 12366 | 58 | PORT = 12366 |
62 | DEBUG = NO | ||
63 | 59 | ||
64 | [transport-tcp] | 60 | [transport-tcp] |
65 | TIMEOUT = 300 s | 61 | TIMEOUT = 300 s |
diff --git a/src/mesh/test_mesh_2dtorus.c b/src/mesh/test_mesh_2dtorus.c index 58777c001..4c1e406ef 100644 --- a/src/mesh/test_mesh_2dtorus.c +++ b/src/mesh/test_mesh_2dtorus.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_testing_lib.h" | 26 | #include "gnunet_testing_lib.h" |
27 | 27 | ||
28 | #define VERBOSE GNUNET_YES | ||
29 | #define REMOVE_DIR GNUNET_YES | 28 | #define REMOVE_DIR GNUNET_YES |
30 | 29 | ||
31 | /** | 30 | /** |
@@ -107,13 +106,11 @@ shutdown_callback (void *cls, const char *emsg) | |||
107 | "test: Shutdown of peers failed! (%s)\n", emsg); | 106 | "test: Shutdown of peers failed! (%s)\n", emsg); |
108 | ok--; | 107 | ok--; |
109 | } | 108 | } |
110 | #if VERBOSE | ||
111 | else | 109 | else |
112 | { | 110 | { |
113 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 111 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
114 | "test: All peers successfully shut down!\n"); | 112 | "test: All peers successfully shut down!\n"); |
115 | } | 113 | } |
116 | #endif | ||
117 | GNUNET_CONFIGURATION_destroy (testing_cfg); | 114 | GNUNET_CONFIGURATION_destroy (testing_cfg); |
118 | } | 115 | } |
119 | 116 | ||
@@ -121,10 +118,7 @@ shutdown_callback (void *cls, const char *emsg) | |||
121 | static void | 118 | static void |
122 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 119 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
123 | { | 120 | { |
124 | #if VERBOSE | ||
125 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n"); | 121 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n"); |
126 | #endif | ||
127 | |||
128 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 122 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
129 | } | 123 | } |
130 | 124 | ||
@@ -201,15 +195,9 @@ peergroup_ready (void *cls, const char *emsg) | |||
201 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 195 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
202 | return; | 196 | return; |
203 | } | 197 | } |
204 | #if VERBOSE | ||
205 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 198 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
206 | "************************************************************\n"); | 199 | "test: Peer Group started successfully with %u connections\n", |
207 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
208 | "test: Peer Group started successfully!\n"); | ||
209 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Have %u connections\n", | ||
210 | total_connections); | 200 | total_connections); |
211 | #endif | ||
212 | |||
213 | peers_running = GNUNET_TESTING_daemons_running (pg); | 201 | peers_running = GNUNET_TESTING_daemons_running (pg); |
214 | if (0 < failed_connections) | 202 | if (0 < failed_connections) |
215 | { | 203 | { |
@@ -287,19 +275,11 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
287 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); | 275 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); |
288 | 276 | ||
289 | GNUNET_log_setup ("test_mesh_2dtorus", | 277 | GNUNET_log_setup ("test_mesh_2dtorus", |
290 | #if VERBOSE | ||
291 | "DEBUG", | ||
292 | #else | ||
293 | "WARNING", | 278 | "WARNING", |
294 | #endif | ||
295 | NULL); | 279 | NULL); |
296 | 280 | ||
297 | #if VERBOSE | ||
298 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n"); | ||
299 | GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing_old", | ||
300 | "use_progressbars", "YES"); | ||
301 | #endif | ||
302 | 281 | ||
282 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n"); | ||
303 | if (GNUNET_OK != | 283 | if (GNUNET_OK != |
304 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", | 284 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", |
305 | "num_peers", &num_peers)) | 285 | "num_peers", &num_peers)) |
@@ -342,10 +322,6 @@ main (int argc, char *argv[]) | |||
342 | argv[0], | 322 | argv[0], |
343 | "-c", | 323 | "-c", |
344 | "test_mesh_2dtorus.conf", | 324 | "test_mesh_2dtorus.conf", |
345 | #if VERBOSE | ||
346 | "-L", | ||
347 | "DEBUG", | ||
348 | #endif | ||
349 | NULL | 325 | NULL |
350 | }; | 326 | }; |
351 | 327 | ||
diff --git a/src/mesh/test_mesh_2dtorus.conf b/src/mesh/test_mesh_2dtorus.conf index b6291fff5..826257139 100644 --- a/src/mesh/test_mesh_2dtorus.conf +++ b/src/mesh/test_mesh_2dtorus.conf | |||
@@ -4,14 +4,12 @@ SERVICEHOME = /tmp/test_mesh_small/ | |||
4 | [arm] | 4 | [arm] |
5 | PORT = 10010 | 5 | PORT = 10010 |
6 | DEFAULTSERVICES = core dht mesh | 6 | DEFAULTSERVICES = core dht mesh |
7 | #DEBUG = YES | ||
8 | 7 | ||
9 | [statistics] | 8 | [statistics] |
10 | AUTOSTART = YES | 9 | AUTOSTART = YES |
11 | PORT = 10000 | 10 | PORT = 10000 |
12 | 11 | ||
13 | [dht] | 12 | [dht] |
14 | DEBUG = NO | ||
15 | AUTOSTART = YES | 13 | AUTOSTART = YES |
16 | ACCEPT_FROM6 = ::1; | 14 | ACCEPT_FROM6 = ::1; |
17 | ACCEPT_FROM = 127.0.0.1; | 15 | ACCEPT_FROM = 127.0.0.1; |
@@ -53,7 +51,6 @@ PORT = 10004 | |||
53 | 51 | ||
54 | [mesh] | 52 | [mesh] |
55 | PORT = 10005 | 53 | PORT = 10005 |
56 | DEBUG=YES | ||
57 | ACCEPT_FROM = 127.0.0.1; | 54 | ACCEPT_FROM = 127.0.0.1; |
58 | HOSTNAME = localhost | 55 | HOSTNAME = localhost |
59 | # PREFIX = valgrind --leak-check=full | 56 | # PREFIX = valgrind --leak-check=full |
@@ -78,7 +75,6 @@ CONNECT_TOPOLOGY = 2D_TORUS | |||
78 | F2F = NO | 75 | F2F = NO |
79 | CONNECT_TIMEOUT = 600 s | 76 | CONNECT_TIMEOUT = 600 s |
80 | CONNECT_ATTEMPTS = 2 | 77 | CONNECT_ATTEMPTS = 2 |
81 | DEBUG = YES | ||
82 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat | 78 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat |
83 | MAX_CONCURRENT_SSH = 10 | 79 | MAX_CONCURRENT_SSH = 10 |
84 | USE_PROGRESSBARS = YES | 80 | USE_PROGRESSBARS = YES |
diff --git a/src/mesh/test_mesh_path.conf b/src/mesh/test_mesh_path.conf index 5ac9710d4..9a9cf3087 100644 --- a/src/mesh/test_mesh_path.conf +++ b/src/mesh/test_mesh_path.conf | |||
@@ -5,7 +5,6 @@ AUTOSTART = NO | |||
5 | AUTOSTART = NO | 5 | AUTOSTART = NO |
6 | 6 | ||
7 | [mesh] | 7 | [mesh] |
8 | DEBUG = YES | ||
9 | AUTOSTART = YES | 8 | AUTOSTART = YES |
10 | ACCEPT_FROM = 127.0.0.1; | 9 | ACCEPT_FROM = 127.0.0.1; |
11 | HOSTNAME = localhost | 10 | HOSTNAME = localhost |
@@ -14,7 +13,6 @@ PORT = 10511 | |||
14 | # PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args | 13 | # PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args |
15 | 14 | ||
16 | [dht] | 15 | [dht] |
17 | DEBUG = NO | ||
18 | AUTOSTART = YES | 16 | AUTOSTART = YES |
19 | ACCEPT_FROM6 = ::1; | 17 | ACCEPT_FROM6 = ::1; |
20 | ACCEPT_FROM = 127.0.0.1; | 18 | ACCEPT_FROM = 127.0.0.1; |
@@ -30,7 +28,6 @@ DATABASE = sqlite | |||
30 | 28 | ||
31 | [transport] | 29 | [transport] |
32 | PLUGINS = tcp | 30 | PLUGINS = tcp |
33 | DEBUG = NO | ||
34 | ACCEPT_FROM6 = ::1; | 31 | ACCEPT_FROM6 = ::1; |
35 | ACCEPT_FROM = 127.0.0.1; | 32 | ACCEPT_FROM = 127.0.0.1; |
36 | NEIGHBOUR_LIMIT = 50 | 33 | NEIGHBOUR_LIMIT = 50 |
@@ -56,7 +53,6 @@ PORT = 12092 | |||
56 | [arm] | 53 | [arm] |
57 | DEFAULTSERVICES = core | 54 | DEFAULTSERVICES = core |
58 | PORT = 12366 | 55 | PORT = 12366 |
59 | DEBUG = NO | ||
60 | 56 | ||
61 | [transport-tcp] | 57 | [transport-tcp] |
62 | TIMEOUT = 300 s | 58 | TIMEOUT = 300 s |
diff --git a/src/mesh/test_mesh_regex.c b/src/mesh/test_mesh_regex.c index 8e65324df..4bb0c8ddf 100644 --- a/src/mesh/test_mesh_regex.c +++ b/src/mesh/test_mesh_regex.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include "gnunet_testing_lib.h" | 27 | #include "gnunet_testing_lib.h" |
28 | #include "gnunet_mesh_service.h" | 28 | #include "gnunet_mesh_service.h" |
29 | 29 | ||
30 | #define VERBOSE GNUNET_YES | ||
31 | #define REMOVE_DIR GNUNET_YES | 30 | #define REMOVE_DIR GNUNET_YES |
32 | #define MESH_REGEX_PEERS 4 | 31 | #define MESH_REGEX_PEERS 4 |
33 | 32 | ||
@@ -159,13 +158,11 @@ shutdown_callback (void *cls, const char *emsg) | |||
159 | for (i = 0; i < MESH_REGEX_PEERS; i++) | 158 | for (i = 0; i < MESH_REGEX_PEERS; i++) |
160 | ok[i] = GNUNET_NO; | 159 | ok[i] = GNUNET_NO; |
161 | } | 160 | } |
162 | #if VERBOSE | ||
163 | else | 161 | else |
164 | { | 162 | { |
165 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 163 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
166 | "test: All peers successfully shut down!\n"); | 164 | "test: All peers successfully shut down!\n"); |
167 | } | 165 | } |
168 | #endif | ||
169 | GNUNET_CONFIGURATION_destroy (testing_cfg); | 166 | GNUNET_CONFIGURATION_destroy (testing_cfg); |
170 | } | 167 | } |
171 | 168 | ||
@@ -180,9 +177,7 @@ shutdown_callback (void *cls, const char *emsg) | |||
180 | static void | 177 | static void |
181 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 178 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
182 | { | 179 | { |
183 | #if VERBOSE | ||
184 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n"); | 180 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n"); |
185 | #endif | ||
186 | shutdown_handle = GNUNET_SCHEDULER_NO_TASK; | 181 | shutdown_handle = GNUNET_SCHEDULER_NO_TASK; |
187 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 182 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
188 | } | 183 | } |
@@ -407,13 +402,9 @@ peergroup_ready (void *cls, const char *emsg) | |||
407 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 402 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
408 | return; | 403 | return; |
409 | } | 404 | } |
410 | #if VERBOSE | 405 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
411 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 406 | "Peer Group started successfully with %u connections\n", |
412 | "test: Peer Group started successfully!\n"); | ||
413 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "test: Have %u connections\n", | ||
414 | total_connections); | 407 | total_connections); |
415 | #endif | ||
416 | |||
417 | peers_running = GNUNET_TESTING_daemons_running (pg); | 408 | peers_running = GNUNET_TESTING_daemons_running (pg); |
418 | if (0 < failed_connections) | 409 | if (0 < failed_connections) |
419 | { | 410 | { |
@@ -519,19 +510,9 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
519 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); | 510 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); |
520 | 511 | ||
521 | GNUNET_log_setup ("test_mesh_regex", | 512 | GNUNET_log_setup ("test_mesh_regex", |
522 | #if VERBOSE | ||
523 | "DEBUG", | ||
524 | #else | ||
525 | "WARNING", | 513 | "WARNING", |
526 | #endif | ||
527 | NULL); | 514 | NULL); |
528 | |||
529 | #if VERBOSE | ||
530 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n"); | 515 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n"); |
531 | GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing_old", | ||
532 | "use_progressbars", "YES"); | ||
533 | #endif | ||
534 | |||
535 | if (GNUNET_OK != | 516 | if (GNUNET_OK != |
536 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", | 517 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", |
537 | "num_peers", &num_peers)) | 518 | "num_peers", &num_peers)) |
@@ -574,10 +555,6 @@ main (int argc, char *argv[]) | |||
574 | argv[0], | 555 | argv[0], |
575 | "-c", | 556 | "-c", |
576 | "test_mesh_2dtorus.conf", | 557 | "test_mesh_2dtorus.conf", |
577 | #if VERBOSE | ||
578 | "-L", | ||
579 | "DEBUG", | ||
580 | #endif | ||
581 | NULL | 558 | NULL |
582 | }; | 559 | }; |
583 | int result; | 560 | int result; |
diff --git a/src/mesh/test_mesh_small.c b/src/mesh/test_mesh_small.c index 3f9e1c2ae..80edad496 100644 --- a/src/mesh/test_mesh_small.c +++ b/src/mesh/test_mesh_small.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <gauger.h> | 29 | #include <gauger.h> |
30 | 30 | ||
31 | 31 | ||
32 | #define VERBOSE GNUNET_YES | ||
33 | #define REMOVE_DIR GNUNET_YES | 32 | #define REMOVE_DIR GNUNET_YES |
34 | 33 | ||
35 | struct MeshPeer | 34 | struct MeshPeer |
@@ -289,18 +288,14 @@ shutdown_callback (void *cls, const char *emsg) | |||
289 | { | 288 | { |
290 | if (emsg != NULL) | 289 | if (emsg != NULL) |
291 | { | 290 | { |
292 | #if VERBOSE | ||
293 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 291 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
294 | "Shutdown of peers failed!\n"); | 292 | "Shutdown of peers failed!\n"); |
295 | #endif | ||
296 | ok--; | 293 | ok--; |
297 | } | 294 | } |
298 | else | 295 | else |
299 | { | 296 | { |
300 | #if VERBOSE | ||
301 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 297 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
302 | "All peers successfully shut down!\n"); | 298 | "All peers successfully shut down!\n"); |
303 | #endif | ||
304 | } | 299 | } |
305 | GNUNET_CONFIGURATION_destroy (testing_cfg); | 300 | GNUNET_CONFIGURATION_destroy (testing_cfg); |
306 | } | 301 | } |
@@ -315,11 +310,8 @@ shutdown_callback (void *cls, const char *emsg) | |||
315 | static void | 310 | static void |
316 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 311 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
317 | { | 312 | { |
318 | #if VERBOSE | ||
319 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 313 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
320 | "Ending test.\n"); | 314 | "Ending test.\n"); |
321 | #endif | ||
322 | |||
323 | if (disconnect_task != GNUNET_SCHEDULER_NO_TASK) | 315 | if (disconnect_task != GNUNET_SCHEDULER_NO_TASK) |
324 | { | 316 | { |
325 | GNUNET_SCHEDULER_cancel (disconnect_task); | 317 | GNUNET_SCHEDULER_cancel (disconnect_task); |
@@ -877,7 +869,6 @@ connect_mesh_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
877 | } | 869 | } |
878 | app = (GNUNET_MESH_ApplicationType) 0; | 870 | app = (GNUNET_MESH_ApplicationType) 0; |
879 | 871 | ||
880 | #if VERBOSE | ||
881 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 872 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
882 | "connecting to mesh service of peer %s\n", | 873 | "connecting to mesh service of peer %s\n", |
883 | GNUNET_i2s (&d1->id)); | 874 | GNUNET_i2s (&d1->id)); |
@@ -890,7 +881,6 @@ connect_mesh_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
890 | "connecting to mesh service of peer %s\n", | 881 | "connecting to mesh service of peer %s\n", |
891 | GNUNET_i2s (&d3->id)); | 882 | GNUNET_i2s (&d3->id)); |
892 | } | 883 | } |
893 | #endif | ||
894 | h1 = GNUNET_MESH_connect (d1->cfg, (void *) 1L, NULL, &tunnel_cleaner, | 884 | h1 = GNUNET_MESH_connect (d1->cfg, (void *) 1L, NULL, &tunnel_cleaner, |
895 | handlers, &app); | 885 | handlers, &app); |
896 | h2 = GNUNET_MESH_connect (d2->cfg, (void *) 2L, &incoming_tunnel, | 886 | h2 = GNUNET_MESH_connect (d2->cfg, (void *) 2L, &incoming_tunnel, |
@@ -943,16 +933,9 @@ peergroup_ready (void *cls, const char *emsg) | |||
943 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); | 933 | GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); |
944 | return; | 934 | return; |
945 | } | 935 | } |
946 | #if VERBOSE | ||
947 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
948 | "************************************************************\n"); | ||
949 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
950 | "Peer Group started successfully!\n"); | ||
951 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 936 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
952 | "Have %u connections\n", | 937 | "Peer Group started successfully with %u connections\n", |
953 | total_connections); | 938 | total_connections); |
954 | #endif | ||
955 | |||
956 | if (data_file != NULL) | 939 | if (data_file != NULL) |
957 | { | 940 | { |
958 | buf = NULL; | 941 | buf = NULL; |
@@ -1041,20 +1024,11 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1041 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); | 1024 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); |
1042 | 1025 | ||
1043 | GNUNET_log_setup ("test_mesh_small", | 1026 | GNUNET_log_setup ("test_mesh_small", |
1044 | #if VERBOSE | ||
1045 | "DEBUG", | ||
1046 | #else | ||
1047 | "WARNING", | 1027 | "WARNING", |
1048 | #endif | ||
1049 | NULL); | 1028 | NULL); |
1050 | 1029 | ||
1051 | #if VERBOSE | ||
1052 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1030 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1053 | "Starting daemons.\n"); | 1031 | "Starting daemons.\n"); |
1054 | GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing_old", | ||
1055 | "use_progressbars", "YES"); | ||
1056 | #endif | ||
1057 | |||
1058 | if (GNUNET_OK != | 1032 | if (GNUNET_OK != |
1059 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", | 1033 | GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", |
1060 | "num_peers", &num_peers)) | 1034 | "num_peers", &num_peers)) |
@@ -1152,10 +1126,6 @@ main (int argc, char *argv[]) | |||
1152 | argv[0], | 1126 | argv[0], |
1153 | "-c", | 1127 | "-c", |
1154 | "test_mesh_small.conf", | 1128 | "test_mesh_small.conf", |
1155 | #if VERBOSE | ||
1156 | "-L", | ||
1157 | "DEBUG", | ||
1158 | #endif | ||
1159 | NULL | 1129 | NULL |
1160 | }; | 1130 | }; |
1161 | int argc2 = (sizeof (argv2) / sizeof (char *)) - 1; | 1131 | int argc2 = (sizeof (argv2) / sizeof (char *)) - 1; |
@@ -1193,9 +1163,6 @@ main (int argc, char *argv[]) | |||
1193 | test_name = "speed ack"; | 1163 | test_name = "speed ack"; |
1194 | ok_goal = TOTAL_PACKETS * 2 + 3; | 1164 | ok_goal = TOTAL_PACKETS * 2 + 3; |
1195 | argv2 [3] = NULL; // remove -L DEBUG | 1165 | argv2 [3] = NULL; // remove -L DEBUG |
1196 | #if VERBOSE | ||
1197 | argc2 -= 2; | ||
1198 | #endif | ||
1199 | } | 1166 | } |
1200 | else if (strstr (argv[0], "test_mesh_small_speed") != NULL) | 1167 | else if (strstr (argv[0], "test_mesh_small_speed") != NULL) |
1201 | { | 1168 | { |
diff --git a/src/mesh/test_mesh_small.conf b/src/mesh/test_mesh_small.conf index 2277a9a76..4083e8e79 100644 --- a/src/mesh/test_mesh_small.conf +++ b/src/mesh/test_mesh_small.conf | |||
@@ -3,7 +3,6 @@ SERVICEHOME = /tmp/test_mesh_small/ | |||
3 | 3 | ||
4 | [mesh] | 4 | [mesh] |
5 | PORT = 10005 | 5 | PORT = 10005 |
6 | DEBUG = YES | ||
7 | ACCEPT_FROM = 127.0.0.1; | 6 | ACCEPT_FROM = 127.0.0.1; |
8 | HOSTNAME = localhost | 7 | HOSTNAME = localhost |
9 | REFRESH_PATH_TIME = 5 s | 8 | REFRESH_PATH_TIME = 5 s |
@@ -19,14 +18,12 @@ DHT_REPLICAITON_LEVEL = 10 | |||
19 | [arm] | 18 | [arm] |
20 | PORT = 10010 | 19 | PORT = 10010 |
21 | DEFAULTSERVICES = core dht mesh | 20 | DEFAULTSERVICES = core dht mesh |
22 | #DEBUG = YES | ||
23 | 21 | ||
24 | [statistics] | 22 | [statistics] |
25 | AUTOSTART = YES | 23 | AUTOSTART = YES |
26 | PORT = 10000 | 24 | PORT = 10000 |
27 | 25 | ||
28 | [dht] | 26 | [dht] |
29 | DEBUG = NO | ||
30 | AUTOSTART = YES | 27 | AUTOSTART = YES |
31 | ACCEPT_FROM6 = ::1; | 28 | ACCEPT_FROM6 = ::1; |
32 | ACCEPT_FROM = 127.0.0.1; | 29 | ACCEPT_FROM = 127.0.0.1; |
@@ -90,7 +87,6 @@ BLACKLIST_TRANSPORTS = tcp udp http unix | |||
90 | F2F = NO | 87 | F2F = NO |
91 | CONNECT_TIMEOUT = 660 s | 88 | CONNECT_TIMEOUT = 660 s |
92 | CONNECT_ATTEMPTS = 2 | 89 | CONNECT_ATTEMPTS = 2 |
93 | DEBUG = YES | ||
94 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat | 90 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat |
95 | MAX_CONCURRENT_SSH = 10 | 91 | MAX_CONCURRENT_SSH = 10 |
96 | USE_PROGRESSBARS = YES | 92 | USE_PROGRESSBARS = YES |
diff --git a/src/mesh/test_mesh_tree_api.c b/src/mesh/test_mesh_tree_api.c index 1d43135e4..60b88239c 100644 --- a/src/mesh/test_mesh_tree_api.c +++ b/src/mesh/test_mesh_tree_api.c | |||
@@ -35,12 +35,10 @@ | |||
35 | #define MESH_TUNNEL_TREE_C | 35 | #define MESH_TUNNEL_TREE_C |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #define VERBOSE 1 | 38 | static int failed; |
39 | 39 | static int cb_call; | |
40 | int failed; | 40 | static struct GNUNET_PeerIdentity *pi[10]; |
41 | int cb_call; | 41 | static struct MeshTunnelTree *tree; |
42 | struct GNUNET_PeerIdentity *pi[10]; | ||
43 | struct MeshTunnelTree *tree; | ||
44 | 42 | ||
45 | static void | 43 | static void |
46 | cb (void *cls, GNUNET_PEER_Id peer_id) | 44 | cb (void *cls, GNUNET_PEER_Id peer_id) |
@@ -155,11 +153,7 @@ main (int argc, char *argv[]) | |||
155 | failed = 0; | 153 | failed = 0; |
156 | cb_call = 0; | 154 | cb_call = 0; |
157 | GNUNET_log_setup ("test_mesh_api_tree", | 155 | GNUNET_log_setup ("test_mesh_api_tree", |
158 | #if VERBOSE | ||
159 | "DEBUG", | ||
160 | #else | ||
161 | "WARNING", | 156 | "WARNING", |
162 | #endif | ||
163 | NULL); | 157 | NULL); |
164 | for (i = 0; i < 10; i++) | 158 | for (i = 0; i < 10; i++) |
165 | { | 159 | { |
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 94303a9e2..a79ec5e78 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -718,8 +718,11 @@ main (int argc, char *const *argv) | |||
718 | _("GNUnet zone manipulation tool"), | 718 | _("GNUnet zone manipulation tool"), |
719 | options, | 719 | options, |
720 | &run, NULL)) | 720 | &run, NULL)) |
721 | { | ||
722 | GNUNET_free ((void*) argv); | ||
721 | return 1; | 723 | return 1; |
722 | 724 | } | |
725 | GNUNET_free ((void*) argv); | ||
723 | return ret; | 726 | return ret; |
724 | } | 727 | } |
725 | 728 | ||
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 4028e5e21..5e82e08ba 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -1097,8 +1097,8 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary | |||
1097 | { | 1097 | { |
1098 | size_t rd_ser_len; | 1098 | size_t rd_ser_len; |
1099 | size_t name_len; | 1099 | size_t name_len; |
1100 | char * name_tmp; | 1100 | char *name_tmp; |
1101 | char * rd_ser; | 1101 | char *rd_ser; |
1102 | struct GNUNET_CRYPTO_RsaSignaturePurpose *sig_purpose; | 1102 | struct GNUNET_CRYPTO_RsaSignaturePurpose *sig_purpose; |
1103 | struct GNUNET_TIME_AbsoluteNBO *expire_tmp; | 1103 | struct GNUNET_TIME_AbsoluteNBO *expire_tmp; |
1104 | struct GNUNET_TIME_AbsoluteNBO expire_nbo = GNUNET_TIME_absolute_hton (freshness); | 1104 | struct GNUNET_TIME_AbsoluteNBO expire_nbo = GNUNET_TIME_absolute_hton (freshness); |
diff --git a/src/namestore/test_namestore_record_serialization.c b/src/namestore/test_namestore_record_serialization.c index b8818a6c7..7b7cc8b5a 100644 --- a/src/namestore/test_namestore_record_serialization.c +++ b/src/namestore/test_namestore_record_serialization.c | |||
@@ -26,8 +26,6 @@ | |||
26 | #include "gnunet_namestore_service.h" | 26 | #include "gnunet_namestore_service.h" |
27 | #include "namestore.h" | 27 | #include "namestore.h" |
28 | 28 | ||
29 | #define VERBOSE GNUNET_NO | ||
30 | |||
31 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100) | 29 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100) |
32 | 30 | ||
33 | static int res; | 31 | static int res; |
diff --git a/src/nat/gnunet-nat-server.c b/src/nat/gnunet-nat-server.c index e971bd3b1..1a98cdc96 100644 --- a/src/nat/gnunet-nat-server.c +++ b/src/nat/gnunet-nat-server.c | |||
@@ -320,7 +320,11 @@ main (int argc, char *const argv[]) | |||
320 | GNUNET_PROGRAM_run (argc, argv, "gnunet-nat-server [options] PORT", | 320 | GNUNET_PROGRAM_run (argc, argv, "gnunet-nat-server [options] PORT", |
321 | _("GNUnet NAT traversal test helper daemon"), options, | 321 | _("GNUnet NAT traversal test helper daemon"), options, |
322 | &run, NULL)) | 322 | &run, NULL)) |
323 | { | ||
324 | GNUNET_free ((void*) argv); | ||
323 | return 1; | 325 | return 1; |
326 | } | ||
327 | GNUNET_free ((void*) argv); | ||
324 | return 0; | 328 | return 0; |
325 | } | 329 | } |
326 | 330 | ||
diff --git a/src/nat/test_nat_mini.c b/src/nat/test_nat_mini.c index 2c6da3b57..f2e1ee97a 100644 --- a/src/nat/test_nat_mini.c +++ b/src/nat/test_nat_mini.c | |||
@@ -35,9 +35,6 @@ | |||
35 | #include "gnunet_scheduler_lib.h" | 35 | #include "gnunet_scheduler_lib.h" |
36 | #include "gnunet_nat_lib.h" | 36 | #include "gnunet_nat_lib.h" |
37 | 37 | ||
38 | |||
39 | #define VERBOSE GNUNET_NO | ||
40 | |||
41 | /* Time to wait before stopping NAT, in seconds */ | 38 | /* Time to wait before stopping NAT, in seconds */ |
42 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | 39 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
43 | 40 | ||
@@ -104,20 +101,12 @@ main (int argc, char *const argv[]) | |||
104 | "-c", | 101 | "-c", |
105 | "test_nat_data.conf", | 102 | "test_nat_data.conf", |
106 | "-L", | 103 | "-L", |
107 | #if VERBOSE | ||
108 | "DEBUG", | ||
109 | #else | ||
110 | "WARNING", | 104 | "WARNING", |
111 | #endif | ||
112 | NULL | 105 | NULL |
113 | }; | 106 | }; |
114 | 107 | ||
115 | GNUNET_log_setup ("test-nat-mini", | 108 | GNUNET_log_setup ("test-nat-mini", |
116 | #if VERBOSE | ||
117 | "DEBUG", | ||
118 | #else | ||
119 | "WARNING", | 109 | "WARNING", |
120 | #endif | ||
121 | NULL); | 110 | NULL); |
122 | 111 | ||
123 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 112 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
diff --git a/src/nse/nse_profiler_test.conf b/src/nse/nse_profiler_test.conf index b4709dd38..398eb27de 100644 --- a/src/nse/nse_profiler_test.conf +++ b/src/nse/nse_profiler_test.conf | |||
@@ -8,7 +8,6 @@ BINARY = gnunet-service-nse | |||
8 | #BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/nse/.libs/gnunet-service-nse | 8 | #BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/nse/.libs/gnunet-service-nse |
9 | #PREFIX = valgrind --leak-check=full --log-file=valgrind_nse.%p | 9 | #PREFIX = valgrind --leak-check=full --log-file=valgrind_nse.%p |
10 | AUTOSTART = NO | 10 | AUTOSTART = NO |
11 | DEBUG = YES | ||
12 | # Overriding network settings for faster testing (do NOT use | 11 | # Overriding network settings for faster testing (do NOT use |
13 | # these values in production just because they are here) | 12 | # these values in production just because they are here) |
14 | WORKDELAY = 60 s | 13 | WORKDELAY = 60 s |
@@ -20,7 +19,6 @@ PROOFFILE = $SERVICEHOME/nse.proof | |||
20 | PORT = 0 | 19 | PORT = 0 |
21 | DEFAULTSERVICES = core | 20 | DEFAULTSERVICES = core |
22 | UNIXPATH = /tmp/test-nse-service-arm.unix | 21 | UNIXPATH = /tmp/test-nse-service-arm.unix |
23 | #DEBUG = YES | ||
24 | 22 | ||
25 | [statistics] | 23 | [statistics] |
26 | AUTOSTART = YES | 24 | AUTOSTART = YES |
@@ -116,7 +114,6 @@ PROBABILITY = .1 | |||
116 | F2F = NO | 114 | F2F = NO |
117 | CONNECT_TIMEOUT = 360 s | 115 | CONNECT_TIMEOUT = 360 s |
118 | CONNECT_ATTEMPTS = 3 | 116 | CONNECT_ATTEMPTS = 3 |
119 | DEBUG = YES | ||
120 | #HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 117 | #HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
121 | HOSTKEYSFILE = hostkeys.dat | 118 | HOSTKEYSFILE = hostkeys.dat |
122 | MAX_CONCURRENT_SSH = 20 | 119 | MAX_CONCURRENT_SSH = 20 |
diff --git a/src/nse/test_nse.conf b/src/nse/test_nse.conf index 625d059ee..003703bb7 100644 --- a/src/nse/test_nse.conf +++ b/src/nse/test_nse.conf | |||
@@ -8,7 +8,6 @@ BINARY = gnunet-service-nse | |||
8 | #BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/nse/.libs/gnunet-service-nse | 8 | #BINARY = /home/mrwiggles/documents/research/gnunet/gnunet-ng/src/nse/.libs/gnunet-service-nse |
9 | #PREFIX = valgrind --leak-check=full --log-file=valgrind_nse.%p | 9 | #PREFIX = valgrind --leak-check=full --log-file=valgrind_nse.%p |
10 | AUTOSTART = YES | 10 | AUTOSTART = YES |
11 | DEBUG = NO | ||
12 | PROOFFILE = $SERVICEHOME/proof.nse | 11 | PROOFFILE = $SERVICEHOME/proof.nse |
13 | # Overriding network settings for faster testing (do NOT use | 12 | # Overriding network settings for faster testing (do NOT use |
14 | # these values in production just because they are here) | 13 | # these values in production just because they are here) |
@@ -23,7 +22,6 @@ HISTOGRAM = $SERVICEHOME/nse-histogram | |||
23 | PORT = 22354 | 22 | PORT = 22354 |
24 | DEFAULTSERVICES = nse core | 23 | DEFAULTSERVICES = nse core |
25 | UNIXPATH = /tmp/test-nse-service-arm.unix | 24 | UNIXPATH = /tmp/test-nse-service-arm.unix |
26 | #DEBUG = YES | ||
27 | 25 | ||
28 | [fs] | 26 | [fs] |
29 | AUTOSTART = NO | 27 | AUTOSTART = NO |
@@ -66,7 +64,6 @@ PERCENTAGE = 3 | |||
66 | F2F = NO | 64 | F2F = NO |
67 | CONNECT_TIMEOUT = 60 s | 65 | CONNECT_TIMEOUT = 60 s |
68 | CONNECT_ATTEMPTS = 3 | 66 | CONNECT_ATTEMPTS = 3 |
69 | #DEBUG = YES | ||
70 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat | 67 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat |
71 | MAX_CONCURRENT_SSH = 20 | 68 | MAX_CONCURRENT_SSH = 20 |
72 | USE_PROGRESSBARS = YES | 69 | USE_PROGRESSBARS = YES |
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c index b847c0f96..c2520fac0 100644 --- a/src/peerinfo-tool/gnunet-peerinfo.c +++ b/src/peerinfo-tool/gnunet-peerinfo.c | |||
@@ -959,14 +959,17 @@ main (int argc, char *const *argv) | |||
959 | 1, &GNUNET_GETOPT_set_string, &put_uri}, | 959 | 1, &GNUNET_GETOPT_set_string, &put_uri}, |
960 | GNUNET_GETOPT_OPTION_END | 960 | GNUNET_GETOPT_OPTION_END |
961 | }; | 961 | }; |
962 | int ret; | ||
962 | 963 | ||
963 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 964 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
964 | return 2; | 965 | return 2; |
965 | 966 | ||
966 | return (GNUNET_OK == | 967 | ret = (GNUNET_OK == |
967 | GNUNET_PROGRAM_run (argc, argv, "gnunet-peerinfo", | 968 | GNUNET_PROGRAM_run (argc, argv, "gnunet-peerinfo", |
968 | gettext_noop ("Print information about peers."), | 969 | gettext_noop ("Print information about peers."), |
969 | options, &run, NULL)) ? 0 : 1; | 970 | options, &run, NULL)) ? 0 : 1; |
971 | GNUNET_free ((void*) argv); | ||
972 | return ret; | ||
970 | } | 973 | } |
971 | 974 | ||
972 | /* end of gnunet-peerinfo.c */ | 975 | /* end of gnunet-peerinfo.c */ |
diff --git a/src/peerinfo/test_peerinfo_api_data.conf b/src/peerinfo/test_peerinfo_api_data.conf index 6caa1e46b..ddbd02b5e 100644 --- a/src/peerinfo/test_peerinfo_api_data.conf +++ b/src/peerinfo/test_peerinfo_api_data.conf | |||
@@ -3,7 +3,6 @@ SERVICEHOME = /tmp/test-gnunet-peerinfo/ | |||
3 | 3 | ||
4 | [peerinfo] | 4 | [peerinfo] |
5 | PORT = 22354 | 5 | PORT = 22354 |
6 | DEBUG = NO | ||
7 | 6 | ||
8 | [dns] | 7 | [dns] |
9 | AUTOSTART = NO | 8 | AUTOSTART = NO |
diff --git a/src/pt/gnunet-daemon-pt.c b/src/pt/gnunet-daemon-pt.c index 2658ae165..8044f930c 100644 --- a/src/pt/gnunet-daemon-pt.c +++ b/src/pt/gnunet-daemon-pt.c | |||
@@ -966,15 +966,17 @@ main (int argc, char *const *argv) | |||
966 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 966 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { |
967 | GNUNET_GETOPT_OPTION_END | 967 | GNUNET_GETOPT_OPTION_END |
968 | }; | 968 | }; |
969 | int ret; | ||
969 | 970 | ||
970 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 971 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
971 | return 2; | 972 | return 2; |
972 | 973 | ret = (GNUNET_OK == | |
973 | return (GNUNET_OK == | 974 | GNUNET_PROGRAM_run (argc, argv, "gnunet-daemon-pt", |
974 | GNUNET_PROGRAM_run (argc, argv, "gnunet-daemon-pt", | 975 | gettext_noop |
975 | gettext_noop | 976 | ("Daemon to run to perform IP protocol translation to GNUnet"), |
976 | ("Daemon to run to perform IP protocol translation to GNUnet"), | 977 | options, &run, NULL)) ? 0 : 1; |
977 | options, &run, NULL)) ? 0 : 1; | 978 | GNUNET_free ((void*) argv); |
979 | return ret; | ||
978 | } | 980 | } |
979 | 981 | ||
980 | 982 | ||
diff --git a/src/regex/test_regex_graph_api.c b/src/regex/test_regex_graph_api.c index d429025d9..c2c1c74e1 100644 --- a/src/regex/test_regex_graph_api.c +++ b/src/regex/test_regex_graph_api.c | |||
@@ -37,56 +37,47 @@ | |||
37 | * | 37 | * |
38 | * @return 0 if ok, non 0 on error. | 38 | * @return 0 if ok, non 0 on error. |
39 | */ | 39 | */ |
40 | int | 40 | static int |
41 | filecheck (const char *filename) | 41 | filecheck (const char *filename) |
42 | { | 42 | { |
43 | int error = 0; | 43 | int error = 0; |
44 | FILE *fp = NULL; | 44 | FILE *fp; |
45 | 45 | ||
46 | // Check if file was created and delete it again | 46 | // Check if file was created and delete it again |
47 | fp = fopen (filename, "r"); | 47 | if (NULL == (fp = fopen (filename, "r"))) |
48 | |||
49 | if (NULL == fp) | ||
50 | { | 48 | { |
51 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not find graph %s\n", filename); | 49 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not find graph %s\n", filename); |
52 | return ++error; | 50 | return 1; |
53 | } | 51 | } |
54 | 52 | ||
55 | fseek (fp, 0L, SEEK_END); | 53 | GNUNET_break (0 == fseek (fp, 0L, SEEK_END)); |
56 | if (1 > ftell (fp)) | 54 | if (1 > ftell (fp)) |
57 | { | 55 | { |
58 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 56 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
59 | "Graph writing failed, got empty file (%s)!\n", filename); | 57 | "Graph writing failed, got empty file (%s)!\n", |
60 | error++; | 58 | filename); |
59 | error = 2; | ||
61 | } | 60 | } |
62 | 61 | ||
63 | error += fclose (fp); | 62 | GNUNET_assert (0 == fclose (fp)); |
64 | 63 | ||
65 | if (!KEEP_FILES) | 64 | if (!KEEP_FILES) |
66 | { | 65 | { |
67 | if (0 != unlink (filename)) | 66 | if (0 != unlink (filename)) |
68 | { | 67 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, |
69 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not remove temp files (%s)\n", | 68 | "unlink", filename); |
70 | filename); | ||
71 | } | ||
72 | } | 69 | } |
73 | |||
74 | |||
75 | return error; | 70 | return error; |
76 | } | 71 | } |
77 | 72 | ||
73 | |||
78 | int | 74 | int |
79 | main (int argc, char *argv[]) | 75 | main (int argc, char *argv[]) |
80 | { | 76 | { |
81 | GNUNET_log_setup ("test-regex", "WARNING", NULL); | ||
82 | |||
83 | int error; | 77 | int error; |
84 | struct GNUNET_REGEX_Automaton *a; | 78 | struct GNUNET_REGEX_Automaton *a; |
85 | unsigned int i; | 79 | unsigned int i; |
86 | const char *filename = "test_graph.dot"; | 80 | const char *filename = "test_graph.dot"; |
87 | |||
88 | error = 0; | ||
89 | |||
90 | const char *regex[12] = { | 81 | const char *regex[12] = { |
91 | "ab(c|d)+c*(a(b|c)+d)+(bla)+", | 82 | "ab(c|d)+c*(a(b|c)+d)+(bla)+", |
92 | "(bla)*", | 83 | "(bla)*", |
@@ -103,6 +94,8 @@ main (int argc, char *argv[]) | |||
103 | "PADPADPADPADPADPabcdefghixxxxxxxxxxxxxjklmnop*qstoisdjfguisdfguihsdfgbdsuivggsd" | 94 | "PADPADPADPADPADPabcdefghixxxxxxxxxxxxxjklmnop*qstoisdjfguisdfguihsdfgbdsuivggsd" |
104 | }; | 95 | }; |
105 | 96 | ||
97 | GNUNET_log_setup ("test-regex", "WARNING", NULL); | ||
98 | error = 0; | ||
106 | for (i = 0; i < 12; i++) | 99 | for (i = 0; i < 12; i++) |
107 | { | 100 | { |
108 | // Check NFA graph creation | 101 | // Check NFA graph creation |
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index 13468592a..2331aace0 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c | |||
@@ -277,19 +277,19 @@ main (int argc, char *const *argv) | |||
277 | &GNUNET_GETOPT_set_uint, &remote_port}, | 277 | &GNUNET_GETOPT_set_uint, &remote_port}, |
278 | GNUNET_GETOPT_OPTION_END | 278 | GNUNET_GETOPT_OPTION_END |
279 | }; | 279 | }; |
280 | |||
281 | remote_port = 0; | 280 | remote_port = 0; |
282 | remote_host = NULL; | 281 | remote_host = NULL; |
283 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 282 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
284 | return 2; | 283 | return 2; |
285 | 284 | ||
286 | return (GNUNET_OK == | 285 | ret = (GNUNET_OK == |
287 | GNUNET_PROGRAM_run (argc, argv, "gnunet-statistics [options [value]]", | 286 | GNUNET_PROGRAM_run (argc, argv, "gnunet-statistics [options [value]]", |
288 | gettext_noop | 287 | gettext_noop |
289 | ("Print statistics about GNUnet operations."), | 288 | ("Print statistics about GNUnet operations."), |
290 | options, &run, NULL)) ? ret : 1; | 289 | options, &run, NULL)) ? ret : 1; |
291 | 290 | GNUNET_free_non_null (remote_host); | |
292 | GNUNET_free_non_null(remote_host); | 291 | GNUNET_free ((void*) argv); |
292 | return ret; | ||
293 | } | 293 | } |
294 | 294 | ||
295 | /* end of gnunet-statistics.c */ | 295 | /* end of gnunet-statistics.c */ |
diff --git a/src/statistics/test_statistics_api_data.conf b/src/statistics/test_statistics_api_data.conf index c52ff35b3..2099c3bd1 100644 --- a/src/statistics/test_statistics_api_data.conf +++ b/src/statistics/test_statistics_api_data.conf | |||
@@ -4,13 +4,11 @@ SERVICEHOME = /tmp/test-gnunetd-statistics/ | |||
4 | [statistics] | 4 | [statistics] |
5 | PORT = 22353 | 5 | PORT = 22353 |
6 | UNIXPATH = /tmp/test-statistics-service-statistics.unix | 6 | UNIXPATH = /tmp/test-statistics-service-statistics.unix |
7 | #DEBUG = YES | ||
8 | 7 | ||
9 | [arm] | 8 | [arm] |
10 | PORT = 22354 | 9 | PORT = 22354 |
11 | DEFAULTSERVICES = | 10 | DEFAULTSERVICES = |
12 | UNIXPATH = /tmp/test-statistics-service-arm.unix | 11 | UNIXPATH = /tmp/test-statistics-service-arm.unix |
13 | # DEBUG = YES | ||
14 | 12 | ||
15 | [fs] | 13 | [fs] |
16 | AUTOSTART = NO | 14 | AUTOSTART = NO |
diff --git a/src/stream/test_stream_2peers_halfclose.c b/src/stream/test_stream_2peers_halfclose.c index 2502615c2..617ab99a8 100644 --- a/src/stream/test_stream_2peers_halfclose.c +++ b/src/stream/test_stream_2peers_halfclose.c | |||
@@ -23,17 +23,12 @@ | |||
23 | * @brief Testcases for Stream API halfclosed connections between 2 peers | 23 | * @brief Testcases for Stream API halfclosed connections between 2 peers |
24 | * @author Sree Harsha Totakura | 24 | * @author Sree Harsha Totakura |
25 | */ | 25 | */ |
26 | |||
27 | #include <string.h> | ||
28 | |||
29 | #include "platform.h" | 26 | #include "platform.h" |
30 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
31 | #include "gnunet_testbed_service.h" | 28 | #include "gnunet_testbed_service.h" |
32 | #include "gnunet_mesh_service.h" | 29 | #include "gnunet_mesh_service.h" |
33 | #include "gnunet_stream_lib.h" | 30 | #include "gnunet_stream_lib.h" |
34 | 31 | ||
35 | #define VERBOSE 1 | ||
36 | |||
37 | /** | 32 | /** |
38 | * Number of peers | 33 | * Number of peers |
39 | */ | 34 | */ |
diff --git a/src/stream/test_stream_local.conf b/src/stream/test_stream_local.conf index 5e4ccc519..5a517cb3f 100644 --- a/src/stream/test_stream_local.conf +++ b/src/stream/test_stream_local.conf | |||
@@ -11,7 +11,6 @@ AUTOSTART = NO | |||
11 | AUTOSTART = NO | 11 | AUTOSTART = NO |
12 | 12 | ||
13 | [mesh] | 13 | [mesh] |
14 | DEBUG = YES | ||
15 | AUTOSTART = YES | 14 | AUTOSTART = YES |
16 | ACCEPT_FROM = 127.0.0.1; | 15 | ACCEPT_FROM = 127.0.0.1; |
17 | HOSTNAME = localhost | 16 | HOSTNAME = localhost |
@@ -20,7 +19,6 @@ PORT = 10700 | |||
20 | # PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args | 19 | # PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args |
21 | 20 | ||
22 | [dht] | 21 | [dht] |
23 | DEBUG = NO | ||
24 | AUTOSTART = YES | 22 | AUTOSTART = YES |
25 | ACCEPT_FROM6 = ::1; | 23 | ACCEPT_FROM6 = ::1; |
26 | ACCEPT_FROM = 127.0.0.1; | 24 | ACCEPT_FROM = 127.0.0.1; |
@@ -36,7 +34,6 @@ DATABASE = sqlite | |||
36 | 34 | ||
37 | [transport] | 35 | [transport] |
38 | PLUGINS = tcp | 36 | PLUGINS = tcp |
39 | DEBUG = NO | ||
40 | ACCEPT_FROM6 = ::1; | 37 | ACCEPT_FROM6 = ::1; |
41 | ACCEPT_FROM = 127.0.0.1; | 38 | ACCEPT_FROM = 127.0.0.1; |
42 | NEIGHBOUR_LIMIT = 50 | 39 | NEIGHBOUR_LIMIT = 50 |
@@ -52,7 +49,6 @@ PORT = 12092 | |||
52 | [arm] | 49 | [arm] |
53 | DEFAULTSERVICES = core lockmanager | 50 | DEFAULTSERVICES = core lockmanager |
54 | PORT = 12366 | 51 | PORT = 12366 |
55 | DEBUG = NO | ||
56 | 52 | ||
57 | [transport-tcp] | 53 | [transport-tcp] |
58 | TIMEOUT = 300 s | 54 | TIMEOUT = 300 s |
@@ -63,7 +59,6 @@ WEAKRANDOM = YES | |||
63 | 59 | ||
64 | [testing_old] | 60 | [testing_old] |
65 | NUM_PEERS = 5 | 61 | NUM_PEERS = 5 |
66 | DEBUG = YES | ||
67 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat | 62 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat |
68 | MAX_CONCURRENT_SSH = 10 | 63 | MAX_CONCURRENT_SSH = 10 |
69 | USE_PROGRESSBARS = YES | 64 | USE_PROGRESSBARS = YES |
diff --git a/src/template/gnunet-template.c b/src/template/gnunet-template.c index 0bbbc558f..b0d25dc33 100644 --- a/src/template/gnunet-template.c +++ b/src/template/gnunet-template.c | |||
@@ -62,14 +62,15 @@ main (int argc, char *const *argv) | |||
62 | /* FIMXE: add options here */ | 62 | /* FIMXE: add options here */ |
63 | GNUNET_GETOPT_OPTION_END | 63 | GNUNET_GETOPT_OPTION_END |
64 | }; | 64 | }; |
65 | |||
66 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 65 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
67 | return 2; | 66 | return 2; |
68 | 67 | ||
69 | return (GNUNET_OK == | 68 | ret = (GNUNET_OK == |
70 | GNUNET_PROGRAM_run (argc, argv, "gnunet-template", | 69 | GNUNET_PROGRAM_run (argc, argv, "gnunet-template", |
71 | gettext_noop ("help text"), options, &run, | 70 | gettext_noop ("help text"), options, &run, |
72 | NULL)) ? ret : 1; | 71 | NULL)) ? ret : 1; |
72 | GNUNET_free ((void*) argv); | ||
73 | return ret; | ||
73 | } | 74 | } |
74 | 75 | ||
75 | /* end of gnunet-template.c */ | 76 | /* end of gnunet-template.c */ |
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index 6a5b3cf71..3bddfac09 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c | |||
@@ -817,6 +817,7 @@ main (int argc, char *const *argv) | |||
817 | GNUNET_PROGRAM_run (argc, argv, "gnunet-testbed-profiler [OPTIONS] hosts-file", | 817 | GNUNET_PROGRAM_run (argc, argv, "gnunet-testbed-profiler [OPTIONS] hosts-file", |
818 | _("Profiler for testbed"), | 818 | _("Profiler for testbed"), |
819 | options, &run, NULL); | 819 | options, &run, NULL); |
820 | GNUNET_free ((void*) argv); | ||
820 | if (GNUNET_OK != ret) | 821 | if (GNUNET_OK != ret) |
821 | return ret; | 822 | return ret; |
822 | if (GNUNET_OK != result) | 823 | if (GNUNET_OK != result) |
diff --git a/src/testbed/test_testbed_api.conf b/src/testbed/test_testbed_api.conf index 17fdba862..e52b5df0e 100644 --- a/src/testbed/test_testbed_api.conf +++ b/src/testbed/test_testbed_api.conf | |||
@@ -29,7 +29,6 @@ DATABASE = sqlite | |||
29 | 29 | ||
30 | [transport] | 30 | [transport] |
31 | PLUGINS = tcp | 31 | PLUGINS = tcp |
32 | DEBUG = NO | ||
33 | ACCEPT_FROM6 = ::1; | 32 | ACCEPT_FROM6 = ::1; |
34 | ACCEPT_FROM = 127.0.0.1; | 33 | ACCEPT_FROM = 127.0.0.1; |
35 | NEIGHBOUR_LIMIT = 50 | 34 | NEIGHBOUR_LIMIT = 50 |
@@ -46,7 +45,6 @@ AUTOSTART = YES | |||
46 | [arm] | 45 | [arm] |
47 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
48 | PORT = 12366 | 47 | PORT = 12366 |
49 | DEBUG = NO | ||
50 | 48 | ||
51 | [transport-tcp] | 49 | [transport-tcp] |
52 | TIMEOUT = 300 s | 50 | TIMEOUT = 300 s |
@@ -55,7 +53,6 @@ PORT = 12368 | |||
55 | [TESTING] | 53 | [TESTING] |
56 | NUM_PEERS = 5 | 54 | NUM_PEERS = 5 |
57 | WEAKRANDOM = YES | 55 | WEAKRANDOM = YES |
58 | DEBUG = YES | ||
59 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 56 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
60 | MAX_CONCURRENT_SSH = 10 | 57 | MAX_CONCURRENT_SSH = 10 |
61 | USE_PROGRESSBARS = YES | 58 | USE_PROGRESSBARS = YES |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologyclique.conf b/src/testbed/test_testbed_api_testbed_run_topologyclique.conf index 37fc7342d..e54b0b238 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologyclique.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologyclique.conf | |||
@@ -29,7 +29,6 @@ DATABASE = sqlite | |||
29 | 29 | ||
30 | [transport] | 30 | [transport] |
31 | PLUGINS = tcp | 31 | PLUGINS = tcp |
32 | DEBUG = NO | ||
33 | ACCEPT_FROM6 = ::1; | 32 | ACCEPT_FROM6 = ::1; |
34 | ACCEPT_FROM = 127.0.0.1; | 33 | ACCEPT_FROM = 127.0.0.1; |
35 | NEIGHBOUR_LIMIT = 50 | 34 | NEIGHBOUR_LIMIT = 50 |
@@ -46,7 +45,6 @@ AUTOSTART = YES | |||
46 | [arm] | 45 | [arm] |
47 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
48 | PORT = 12366 | 47 | PORT = 12366 |
49 | DEBUG = NO | ||
50 | 48 | ||
51 | [transport-tcp] | 49 | [transport-tcp] |
52 | TIMEOUT = 300 s | 50 | TIMEOUT = 300 s |
@@ -55,7 +53,6 @@ PORT = 12368 | |||
55 | [TESTING] | 53 | [TESTING] |
56 | NUM_PEERS = 5 | 54 | NUM_PEERS = 5 |
57 | WEAKRANDOM = YES | 55 | WEAKRANDOM = YES |
58 | DEBUG = YES | ||
59 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 56 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
60 | MAX_CONCURRENT_SSH = 10 | 57 | MAX_CONCURRENT_SSH = 10 |
61 | USE_PROGRESSBARS = YES | 58 | USE_PROGRESSBARS = YES |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologyline.conf b/src/testbed/test_testbed_api_testbed_run_topologyline.conf index 2958f765c..d3c840dd1 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologyline.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologyline.conf | |||
@@ -29,7 +29,6 @@ DATABASE = sqlite | |||
29 | 29 | ||
30 | [transport] | 30 | [transport] |
31 | PLUGINS = tcp | 31 | PLUGINS = tcp |
32 | DEBUG = NO | ||
33 | ACCEPT_FROM6 = ::1; | 32 | ACCEPT_FROM6 = ::1; |
34 | ACCEPT_FROM = 127.0.0.1; | 33 | ACCEPT_FROM = 127.0.0.1; |
35 | NEIGHBOUR_LIMIT = 50 | 34 | NEIGHBOUR_LIMIT = 50 |
@@ -46,7 +45,6 @@ AUTOSTART = YES | |||
46 | [arm] | 45 | [arm] |
47 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
48 | PORT = 12366 | 47 | PORT = 12366 |
49 | DEBUG = NO | ||
50 | 48 | ||
51 | [transport-tcp] | 49 | [transport-tcp] |
52 | TIMEOUT = 300 s | 50 | TIMEOUT = 300 s |
@@ -55,7 +53,6 @@ PORT = 12368 | |||
55 | [TESTING] | 53 | [TESTING] |
56 | NUM_PEERS = 5 | 54 | NUM_PEERS = 5 |
57 | WEAKRANDOM = YES | 55 | WEAKRANDOM = YES |
58 | DEBUG = YES | ||
59 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 56 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
60 | MAX_CONCURRENT_SSH = 10 | 57 | MAX_CONCURRENT_SSH = 10 |
61 | USE_PROGRESSBARS = YES | 58 | USE_PROGRESSBARS = YES |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf b/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf index 3c7980682..5ba272cfa 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf | |||
@@ -30,7 +30,6 @@ DATABASE = sqlite | |||
30 | 30 | ||
31 | [transport] | 31 | [transport] |
32 | PLUGINS = tcp | 32 | PLUGINS = tcp |
33 | DEBUG = NO | ||
34 | ACCEPT_FROM6 = ::1; | 33 | ACCEPT_FROM6 = ::1; |
35 | ACCEPT_FROM = 127.0.0.1; | 34 | ACCEPT_FROM = 127.0.0.1; |
36 | NEIGHBOUR_LIMIT = 50 | 35 | NEIGHBOUR_LIMIT = 50 |
@@ -47,7 +46,6 @@ AUTOSTART = YES | |||
47 | [arm] | 46 | [arm] |
48 | DEFAULTSERVICES = core transport | 47 | DEFAULTSERVICES = core transport |
49 | PORT = 12366 | 48 | PORT = 12366 |
50 | DEBUG = NO | ||
51 | 49 | ||
52 | [transport-tcp] | 50 | [transport-tcp] |
53 | TIMEOUT = 300 s | 51 | TIMEOUT = 300 s |
@@ -56,7 +54,6 @@ PORT = 12368 | |||
56 | [TESTING] | 54 | [TESTING] |
57 | NUM_PEERS = 5 | 55 | NUM_PEERS = 5 |
58 | WEAKRANDOM = YES | 56 | WEAKRANDOM = YES |
59 | DEBUG = YES | ||
60 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 57 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
61 | MAX_CONCURRENT_SSH = 10 | 58 | MAX_CONCURRENT_SSH = 10 |
62 | USE_PROGRESSBARS = YES | 59 | USE_PROGRESSBARS = YES |
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c index cc5c6f50c..ba864e3f0 100644 --- a/src/testing/gnunet-testing.c +++ b/src/testing/gnunet-testing.c | |||
@@ -209,14 +209,15 @@ main (int argc, char *const *argv) | |||
209 | GNUNET_YES, &GNUNET_GETOPT_set_string, &create_cfg_template}, | 209 | GNUNET_YES, &GNUNET_GETOPT_set_string, &create_cfg_template}, |
210 | GNUNET_GETOPT_OPTION_END | 210 | GNUNET_GETOPT_OPTION_END |
211 | }; | 211 | }; |
212 | |||
213 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 212 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
214 | return 2; | 213 | return 2; |
215 | 214 | ||
216 | return (GNUNET_OK == | 215 | ret = (GNUNET_OK == |
217 | GNUNET_PROGRAM_run (argc, argv, "gnunet-testing", | 216 | GNUNET_PROGRAM_run (argc, argv, "gnunet-testing", |
218 | gettext_noop ("Command line tool to access the testing library"), options, &run, | 217 | gettext_noop ("Command line tool to access the testing library"), options, &run, |
219 | NULL)) ? ret : 1; | 218 | NULL)) ? ret : 1; |
219 | GNUNET_free ((void*) argv); | ||
220 | return ret; | ||
220 | } | 221 | } |
221 | 222 | ||
222 | /* end of gnunet-testing.c */ | 223 | /* end of gnunet-testing.c */ |
diff --git a/src/testing_old/Makefile.am b/src/testing_old/Makefile.am index 7a7f19364..2e5eb4bf7 100644 --- a/src/testing_old/Makefile.am +++ b/src/testing_old/Makefile.am | |||
@@ -80,12 +80,13 @@ check_PROGRAMS = \ | |||
80 | test_testing_topology_scale_free | 80 | test_testing_topology_scale_free |
81 | 81 | ||
82 | if ENABLE_TEST_RUN | 82 | if ENABLE_TEST_RUN |
83 | TESTS = \ | 83 | # Don't bother to test old-testing at this point |
84 | test_testing \ | 84 | #TESTS = \ |
85 | test_testing_connect \ | 85 | # test_testing \ |
86 | test_testing_reconnect \ | 86 | # test_testing_connect \ |
87 | test_testing_group \ | 87 | # test_testing_reconnect \ |
88 | test_testing_peergroup | 88 | # test_testing_group \ |
89 | # test_testing_peergroup | ||
89 | endif | 90 | endif |
90 | 91 | ||
91 | 92 | ||
diff --git a/src/testing_old/test_testing_2dtorus.conf b/src/testing_old/test_testing_2dtorus.conf index 4ec3db83e..993ab372d 100644 --- a/src/testing_old/test_testing_2dtorus.conf +++ b/src/testing_old/test_testing_2dtorus.conf | |||
@@ -5,14 +5,12 @@ SERVICEHOME = /tmp/test_testing_2dtorus/ | |||
5 | [arm] | 5 | [arm] |
6 | PORT = 10010 | 6 | PORT = 10010 |
7 | DEFAULTSERVICES = core | 7 | DEFAULTSERVICES = core |
8 | #DEBUG = YES | ||
9 | 8 | ||
10 | [statistics] | 9 | [statistics] |
11 | AUTOSTART = YES | 10 | AUTOSTART = YES |
12 | PORT = 10000 | 11 | PORT = 10000 |
13 | 12 | ||
14 | [dht] | 13 | [dht] |
15 | DEBUG = NO | ||
16 | AUTOSTART = YES | 14 | AUTOSTART = YES |
17 | ACCEPT_FROM6 = ::1; | 15 | ACCEPT_FROM6 = ::1; |
18 | ACCEPT_FROM = 127.0.0.1; | 16 | ACCEPT_FROM = 127.0.0.1; |
@@ -66,7 +64,6 @@ CONNECT_TOPOLOGY = 2D_TORUS | |||
66 | F2F = NO | 64 | F2F = NO |
67 | CONNECT_TIMEOUT = 600 s | 65 | CONNECT_TIMEOUT = 600 s |
68 | CONNECT_ATTEMPTS = 2 | 66 | CONNECT_ATTEMPTS = 2 |
69 | DEBUG = YES | ||
70 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat | 67 | HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat |
71 | MAX_CONCURRENT_SSH = 10 | 68 | MAX_CONCURRENT_SSH = 10 |
72 | USE_PROGRESSBARS = YES | 69 | USE_PROGRESSBARS = YES |
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 682ad417c..fc1f461ed 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c | |||
@@ -1364,6 +1364,7 @@ main (int argc, char *const *argv) | |||
1364 | _ | 1364 | _ |
1365 | ("GNUnet topology control (maintaining P2P mesh and F2F constraints)"), | 1365 | ("GNUnet topology control (maintaining P2P mesh and F2F constraints)"), |
1366 | options, &run, NULL)) ? 0 : 1; | 1366 | options, &run, NULL)) ? 0 : 1; |
1367 | GNUNET_free ((void*) argv); | ||
1367 | return ret; | 1368 | return ret; |
1368 | } | 1369 | } |
1369 | 1370 | ||
diff --git a/src/topology/test_gnunet_daemon_topology_data.conf b/src/topology/test_gnunet_daemon_topology_data.conf index c4e01aced..178f50fda 100644 --- a/src/topology/test_gnunet_daemon_topology_data.conf +++ b/src/topology/test_gnunet_daemon_topology_data.conf | |||
@@ -7,7 +7,6 @@ PORT = 2664 | |||
7 | [transport] | 7 | [transport] |
8 | PORT = 2665 | 8 | PORT = 2665 |
9 | PLUGINS = tcp | 9 | PLUGINS = tcp |
10 | #DEBUG = YES | ||
11 | #PREFIX = xterm -e xterm -T transport -e gdb -x cmd --args | 10 | #PREFIX = xterm -e xterm -T transport -e gdb -x cmd --args |
12 | #PREFIX = valgrind --tool=memcheck --log-file=logs%p | 11 | #PREFIX = valgrind --tool=memcheck --log-file=logs%p |
13 | 12 | ||
@@ -37,10 +36,8 @@ PORT = 2669 | |||
37 | 36 | ||
38 | [core] | 37 | [core] |
39 | PORT = 2670 | 38 | PORT = 2670 |
40 | #DEBUG = YES | ||
41 | 39 | ||
42 | [topology] | 40 | [topology] |
43 | # DEBUG = YES | ||
44 | #PREFIX = valgrind --tool=memcheck | 41 | #PREFIX = valgrind --tool=memcheck |
45 | 42 | ||
46 | [fs] | 43 | [fs] |
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index 5978de6bb..18b1b9839 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -745,13 +745,9 @@ main (int argc, char *const *argv) | |||
745 | ("Direct access to transport service."), options, | 745 | ("Direct access to transport service."), options, |
746 | &run, NULL); | 746 | &run, NULL); |
747 | GNUNET_free ((void *) argv); | 747 | GNUNET_free ((void *) argv); |
748 | |||
749 | if (GNUNET_OK == res) | 748 | if (GNUNET_OK == res) |
750 | return ret; | 749 | return ret; |
751 | else | 750 | return 1; |
752 | return 1; | ||
753 | |||
754 | |||
755 | } | 751 | } |
756 | 752 | ||
757 | 753 | ||
diff --git a/src/transport/template_cfg_peer1.conf b/src/transport/template_cfg_peer1.conf index 05309d53c..8856418b3 100644 --- a/src/transport/template_cfg_peer1.conf +++ b/src/transport/template_cfg_peer1.conf | |||
@@ -39,11 +39,9 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
39 | [transport] | 39 | [transport] |
40 | #PREFIX = valgrind --leak-check=full | 40 | #PREFIX = valgrind --leak-check=full |
41 | PORT = 12001 | 41 | PORT = 12001 |
42 | #DEBUG = YES | ||
43 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 42 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
44 | 43 | ||
45 | [ats] | 44 | [ats] |
46 | #DEBUG = YES | ||
47 | WAN_QUOTA_IN = unlimited | 45 | WAN_QUOTA_IN = unlimited |
48 | WAN_QUOTA_OUT = unlimited | 46 | WAN_QUOTA_OUT = unlimited |
49 | PORT = 12006 | 47 | PORT = 12006 |
diff --git a/src/transport/template_cfg_peer2.conf b/src/transport/template_cfg_peer2.conf index 210ee51c5..54636ca6b 100644 --- a/src/transport/template_cfg_peer2.conf +++ b/src/transport/template_cfg_peer2.conf | |||
@@ -43,7 +43,6 @@ PORT = 12010 | |||
43 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 43 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
44 | 44 | ||
45 | [ats] | 45 | [ats] |
46 | #DEBUG = YES | ||
47 | WAN_QUOTA_IN = unlimited | 46 | WAN_QUOTA_IN = unlimited |
48 | WAN_QUOTA_OUT = unlimited | 47 | WAN_QUOTA_OUT = unlimited |
49 | PORT = 12016 | 48 | PORT = 12016 |
diff --git a/src/transport/test_transport_api_bidirectional_connect_peer1.conf b/src/transport/test_transport_api_bidirectional_connect_peer1.conf index 614d89d21..ba6afbe6e 100644 --- a/src/transport/test_transport_api_bidirectional_connect_peer1.conf +++ b/src/transport/test_transport_api_bidirectional_connect_peer1.conf | |||
@@ -22,7 +22,6 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
22 | [transport] | 22 | [transport] |
23 | PORT = 12004 | 23 | PORT = 12004 |
24 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 24 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
25 | #DEBUG = YES | ||
26 | 25 | ||
27 | [transport-tcp] | 26 | [transport-tcp] |
28 | PORT = 12005 | 27 | PORT = 12005 |
diff --git a/src/transport/test_transport_api_disconnect_tcp_peer1.conf b/src/transport/test_transport_api_disconnect_tcp_peer1.conf index 6879d0534..5f1d693a8 100644 --- a/src/transport/test_transport_api_disconnect_tcp_peer1.conf +++ b/src/transport/test_transport_api_disconnect_tcp_peer1.conf | |||
@@ -27,5 +27,4 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
27 | PORT = 12001 | 27 | PORT = 12001 |
28 | PLUGINS = tcp | 28 | PLUGINS = tcp |
29 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 29 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
30 | #DEBUG = YES | ||
31 | 30 | ||
diff --git a/src/transport/test_transport_api_http_peer1.conf b/src/transport/test_transport_api_http_peer1.conf index e0b60e37f..3c1b41d06 100644 --- a/src/transport/test_transport_api_http_peer1.conf +++ b/src/transport/test_transport_api_http_peer1.conf | |||
@@ -22,7 +22,6 @@ PORT = 12082 | |||
22 | UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | 22 | UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock |
23 | 23 | ||
24 | [transport] | 24 | [transport] |
25 | #DEBUG = YES | ||
26 | PORT = 12081 | 25 | PORT = 12081 |
27 | PLUGINS = http_client | 26 | PLUGINS = http_client |
28 | #BINARY = .libs/gnunet-service-transport | 27 | #BINARY = .libs/gnunet-service-transport |
diff --git a/src/transport/test_transport_api_http_peer2.conf b/src/transport/test_transport_api_http_peer2.conf index 4e4c22e30..f348bf404 100644 --- a/src/transport/test_transport_api_http_peer2.conf +++ b/src/transport/test_transport_api_http_peer2.conf | |||
@@ -25,7 +25,6 @@ PORT = 12092 | |||
25 | UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | 25 | UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock |
26 | 26 | ||
27 | [transport] | 27 | [transport] |
28 | #DEBUG = YES | ||
29 | PORT = 12091 | 28 | PORT = 12091 |
30 | PLUGINS = http_server | 29 | PLUGINS = http_server |
31 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 30 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
diff --git a/src/transport/test_transport_api_http_reverse_peer1.conf b/src/transport/test_transport_api_http_reverse_peer1.conf index c38c36a18..93d8bd34b 100644 --- a/src/transport/test_transport_api_http_reverse_peer1.conf +++ b/src/transport/test_transport_api_http_reverse_peer1.conf | |||
@@ -23,7 +23,6 @@ PORT = 12092 | |||
23 | UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | 23 | UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock |
24 | 24 | ||
25 | [transport] | 25 | [transport] |
26 | #DEBUG = YES | ||
27 | PORT = 12091 | 26 | PORT = 12091 |
28 | PLUGINS = http_client | 27 | PLUGINS = http_client |
29 | #BINARY = .libs/gnunet-service-transport | 28 | #BINARY = .libs/gnunet-service-transport |
@@ -33,7 +32,6 @@ PREFIX = valgrind --leak-check=full | |||
33 | 32 | ||
34 | 33 | ||
35 | [ats] | 34 | [ats] |
36 | #DEBUG = YES | ||
37 | WAN_QUOTA_IN = unlimited | 35 | WAN_QUOTA_IN = unlimited |
38 | WAN_QUOTA_OUT = unlimited | 36 | WAN_QUOTA_OUT = unlimited |
39 | PORT = 12006 | 37 | PORT = 12006 |
diff --git a/src/transport/test_transport_api_https_peer1.conf b/src/transport/test_transport_api_https_peer1.conf index 78d3ca0a4..48302a640 100644 --- a/src/transport/test_transport_api_https_peer1.conf +++ b/src/transport/test_transport_api_https_peer1.conf | |||
@@ -26,6 +26,5 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
26 | PORT = 12101 | 26 | PORT = 12101 |
27 | PLUGINS = https_client | 27 | PLUGINS = https_client |
28 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 28 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
29 | DEBUG = NO | ||
30 | 29 | ||
31 | 30 | ||
diff --git a/src/transport/test_transport_api_https_peer2.conf b/src/transport/test_transport_api_https_peer2.conf index a347887bb..566997f93 100644 --- a/src/transport/test_transport_api_https_peer2.conf +++ b/src/transport/test_transport_api_https_peer2.conf | |||
@@ -29,6 +29,5 @@ UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | |||
29 | PORT = 12111 | 29 | PORT = 12111 |
30 | PLUGINS = https_server | 30 | PLUGINS = https_server |
31 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 31 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
32 | DEBUG = NO | ||
33 | 32 | ||
34 | 33 | ||
diff --git a/src/transport/test_transport_api_reliability_http_peer1.conf b/src/transport/test_transport_api_reliability_http_peer1.conf index 9e39e3e41..ea5de0bc9 100644 --- a/src/transport/test_transport_api_reliability_http_peer1.conf +++ b/src/transport/test_transport_api_reliability_http_peer1.conf | |||
@@ -30,5 +30,4 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
30 | PORT = 12181 | 30 | PORT = 12181 |
31 | PLUGINS = http_client | 31 | PLUGINS = http_client |
32 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 32 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
33 | #DEBUG = YES | ||
34 | 33 | ||
diff --git a/src/transport/test_transport_api_reliability_http_peer2.conf b/src/transport/test_transport_api_reliability_http_peer2.conf index 3174e3d00..083cd4dd8 100644 --- a/src/transport/test_transport_api_reliability_http_peer2.conf +++ b/src/transport/test_transport_api_reliability_http_peer2.conf | |||
@@ -27,5 +27,4 @@ UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | |||
27 | PORT = 12191 | 27 | PORT = 12191 |
28 | PLUGINS = http_server | 28 | PLUGINS = http_server |
29 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 29 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
30 | #DEBUG = YES | ||
31 | 30 | ||
diff --git a/src/transport/test_transport_api_reliability_tcp_peer2.conf b/src/transport/test_transport_api_reliability_tcp_peer2.conf index 3cb42c0b6..181aab3de 100644 --- a/src/transport/test_transport_api_reliability_tcp_peer2.conf +++ b/src/transport/test_transport_api_reliability_tcp_peer2.conf | |||
@@ -27,4 +27,3 @@ UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | |||
27 | PORT = 12010 | 27 | PORT = 12010 |
28 | PLUGINS = tcp | 28 | PLUGINS = tcp |
29 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 29 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
30 | #DEBUG = YES | ||
diff --git a/src/transport/test_transport_api_tcp_nat_peer1.conf b/src/transport/test_transport_api_tcp_nat_peer1.conf index 4ebf5b3be..8e33f273d 100644 --- a/src/transport/test_transport_api_tcp_nat_peer1.conf +++ b/src/transport/test_transport_api_tcp_nat_peer1.conf | |||
@@ -32,5 +32,4 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
32 | PORT = 29542 | 32 | PORT = 29542 |
33 | PLUGINS = tcp | 33 | PLUGINS = tcp |
34 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 34 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
35 | #DEBUG = YES | ||
36 | 35 | ||
diff --git a/src/transport/test_transport_api_tcp_nat_peer2.conf b/src/transport/test_transport_api_tcp_nat_peer2.conf index 1ef51c9c9..f8b8b013e 100644 --- a/src/transport/test_transport_api_tcp_nat_peer2.conf +++ b/src/transport/test_transport_api_tcp_nat_peer2.conf | |||
@@ -31,4 +31,3 @@ UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | |||
31 | PORT = 45923 | 31 | PORT = 45923 |
32 | PLUGINS = tcp | 32 | PLUGINS = tcp |
33 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 33 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
34 | #DEBUG = YES | ||
diff --git a/src/transport/test_transport_api_tcp_peer1.conf b/src/transport/test_transport_api_tcp_peer1.conf index 54abfa5ba..db662826b 100644 --- a/src/transport/test_transport_api_tcp_peer1.conf +++ b/src/transport/test_transport_api_tcp_peer1.conf | |||
@@ -27,5 +27,4 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
27 | PORT = 12001 | 27 | PORT = 12001 |
28 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 28 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
29 | PLUGINS = tcp | 29 | PLUGINS = tcp |
30 | #DEBUG = YES | ||
31 | 30 | ||
diff --git a/src/transport/test_transport_api_timeout_http_peer1.conf b/src/transport/test_transport_api_timeout_http_peer1.conf index 2eb23662a..665527b3e 100644 --- a/src/transport/test_transport_api_timeout_http_peer1.conf +++ b/src/transport/test_transport_api_timeout_http_peer1.conf | |||
@@ -24,7 +24,6 @@ PORT = 12082 | |||
24 | UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | 24 | UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock |
25 | 25 | ||
26 | [transport] | 26 | [transport] |
27 | #DEBUG = YES | ||
28 | PORT = 12081 | 27 | PORT = 12081 |
29 | PLUGINS = http_client | 28 | PLUGINS = http_client |
30 | #BINARY = .libs/gnunet-service-transport | 29 | #BINARY = .libs/gnunet-service-transport |
diff --git a/src/transport/test_transport_api_timeout_http_peer2.conf b/src/transport/test_transport_api_timeout_http_peer2.conf index 0aa77a9b9..1fdc94788 100644 --- a/src/transport/test_transport_api_timeout_http_peer2.conf +++ b/src/transport/test_transport_api_timeout_http_peer2.conf | |||
@@ -28,7 +28,6 @@ PORT = 12092 | |||
28 | UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | 28 | UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock |
29 | 29 | ||
30 | [transport] | 30 | [transport] |
31 | #DEBUG = YES | ||
32 | PORT = 12091 | 31 | PORT = 12091 |
33 | PLUGINS = http_server | 32 | PLUGINS = http_server |
34 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 33 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
diff --git a/src/transport/test_transport_api_timeout_https_peer1.conf b/src/transport/test_transport_api_timeout_https_peer1.conf index ff1ef47bd..fda69ae5c 100644 --- a/src/transport/test_transport_api_timeout_https_peer1.conf +++ b/src/transport/test_transport_api_timeout_https_peer1.conf | |||
@@ -23,6 +23,5 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
23 | PORT = 12101 | 23 | PORT = 12101 |
24 | PLUGINS = https_client | 24 | PLUGINS = https_client |
25 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 25 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
26 | DEBUG = NO | ||
27 | 26 | ||
28 | 27 | ||
diff --git a/src/transport/test_transport_api_timeout_https_peer2.conf b/src/transport/test_transport_api_timeout_https_peer2.conf index 35fba0a83..ca54e1718 100644 --- a/src/transport/test_transport_api_timeout_https_peer2.conf +++ b/src/transport/test_transport_api_timeout_https_peer2.conf | |||
@@ -27,6 +27,5 @@ UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | |||
27 | PORT = 12111 | 27 | PORT = 12111 |
28 | PLUGINS = https_server | 28 | PLUGINS = https_server |
29 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 29 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
30 | DEBUG = NO | ||
31 | 30 | ||
32 | 31 | ||
diff --git a/src/transport/test_transport_api_udp_nat_peer1.conf b/src/transport/test_transport_api_udp_nat_peer1.conf index 6e643d5af..e406883e4 100644 --- a/src/transport/test_transport_api_udp_nat_peer1.conf +++ b/src/transport/test_transport_api_udp_nat_peer1.conf | |||
@@ -31,6 +31,5 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
31 | PORT = 12061 | 31 | PORT = 12061 |
32 | PLUGINS = udp | 32 | PLUGINS = udp |
33 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 33 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
34 | DEBUG = NO | ||
35 | 34 | ||
36 | 35 | ||
diff --git a/src/transport/test_transport_api_udp_nat_peer2.conf b/src/transport/test_transport_api_udp_nat_peer2.conf index 1c1258ad1..43ed3a91b 100644 --- a/src/transport/test_transport_api_udp_nat_peer2.conf +++ b/src/transport/test_transport_api_udp_nat_peer2.conf | |||
@@ -29,6 +29,5 @@ UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | |||
29 | PORT = 12071 | 29 | PORT = 12071 |
30 | PLUGINS = udp | 30 | PLUGINS = udp |
31 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 31 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
32 | DEBUG = NO | ||
33 | 32 | ||
34 | 33 | ||
diff --git a/src/transport/test_transport_api_wlan_peer1.conf b/src/transport/test_transport_api_wlan_peer1.conf index ff37415a4..3f12ce505 100644 --- a/src/transport/test_transport_api_wlan_peer1.conf +++ b/src/transport/test_transport_api_wlan_peer1.conf | |||
@@ -7,7 +7,6 @@ INTERFACE = mon0 | |||
7 | TESTMODE = 1 | 7 | TESTMODE = 1 |
8 | 8 | ||
9 | [arm] | 9 | [arm] |
10 | DEBUG = YES | ||
11 | PORT = 12164 | 10 | PORT = 12164 |
12 | UNIXPATH = /tmp/gnunet-p1-service-arm.sock | 11 | UNIXPATH = /tmp/gnunet-p1-service-arm.sock |
13 | 12 | ||
@@ -26,7 +25,6 @@ UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock | |||
26 | [transport] | 25 | [transport] |
27 | PORT = 12160 | 26 | PORT = 12160 |
28 | PLUGINS = wlan | 27 | PLUGINS = wlan |
29 | #DEBUG = YES | ||
30 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 28 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
31 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args | 29 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args |
32 | #PREFIX = valgrind --leak-check=full --show-reachable=yes --main-stacksize=104857600 | 30 | #PREFIX = valgrind --leak-check=full --show-reachable=yes --main-stacksize=104857600 |
diff --git a/src/transport/test_transport_api_wlan_peer2.conf b/src/transport/test_transport_api_wlan_peer2.conf index 87a6036fb..451a2a666 100644 --- a/src/transport/test_transport_api_wlan_peer2.conf +++ b/src/transport/test_transport_api_wlan_peer2.conf | |||
@@ -8,7 +8,6 @@ TESTMODE = 2 | |||
8 | 8 | ||
9 | [arm] | 9 | [arm] |
10 | PORT = 12174 | 10 | PORT = 12174 |
11 | DEBUG = YES | ||
12 | UNIXPATH = /tmp/gnunet-p2-service-arm.sock | 11 | UNIXPATH = /tmp/gnunet-p2-service-arm.sock |
13 | 12 | ||
14 | [statistics] | 13 | [statistics] |
@@ -26,7 +25,6 @@ UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock | |||
26 | [transport] | 25 | [transport] |
27 | PORT = 12170 | 26 | PORT = 12170 |
28 | PLUGINS = wlan | 27 | PLUGINS = wlan |
29 | #DEBUG = YES | ||
30 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 28 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
31 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args | 29 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args |
32 | #PREFIX = valgrind --leak-check=full --show-reachable=yes --main-stacksize=104857600 | 30 | #PREFIX = valgrind --leak-check=full --show-reachable=yes --main-stacksize=104857600 |
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index f1c06ebc0..0c51ef334 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c | |||
@@ -71,19 +71,15 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
71 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count) | 71 | const struct GNUNET_ATS_Information *ats, uint32_t ats_count) |
72 | { | 72 | { |
73 | struct PeerContext *p = cls; | 73 | struct PeerContext *p = cls; |
74 | char *p2_s; | ||
75 | struct PeerContext *p2; | ||
74 | 76 | ||
75 | /* Find PeerContext */ | 77 | GNUNET_assert (NULL != p); |
76 | GNUNET_assert (p != 0); | 78 | GNUNET_assert (NULL != p->tth); |
77 | GNUNET_assert (p->tth != NULL); | 79 | p2 = find_peer_context (p->tth, peer); |
78 | struct PeerContext *p2 = find_peer_context (p->tth, peer); | ||
79 | |||
80 | if (p == NULL) | ||
81 | return; | ||
82 | if (p->nc != NULL) | 80 | if (p->nc != NULL) |
83 | p->nc (p->cb_cls, peer, ats, ats_count); | 81 | p->nc (p->cb_cls, peer, ats, ats_count); |
84 | 82 | ||
85 | char *p2_s; | ||
86 | |||
87 | if (p2 != NULL) | 83 | if (p2 != NULL) |
88 | GNUNET_asprintf (&p2_s, "%u (`%s')", p2->no, GNUNET_i2s (&p2->id)); | 84 | GNUNET_asprintf (&p2_s, "%u (`%s')", p2->no, GNUNET_i2s (&p2->id)); |
89 | else | 85 | else |
@@ -788,5 +784,4 @@ fail: | |||
788 | } | 784 | } |
789 | 785 | ||
790 | 786 | ||
791 | |||
792 | /* end of transport-testing.c */ | 787 | /* end of transport-testing.c */ |
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c index 78c93c3b8..e1aa94a5c 100644 --- a/src/util/gnunet-config.c +++ b/src/util/gnunet-config.c | |||
@@ -170,14 +170,15 @@ main (int argc, char *const *argv) | |||
170 | 1, &GNUNET_GETOPT_set_string, &value }, | 170 | 1, &GNUNET_GETOPT_set_string, &value }, |
171 | GNUNET_GETOPT_OPTION_END | 171 | GNUNET_GETOPT_OPTION_END |
172 | }; | 172 | }; |
173 | |||
174 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 173 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
175 | return 2; | 174 | return 2; |
176 | 175 | ||
177 | return (GNUNET_OK == | 176 | ret = (GNUNET_OK == |
178 | GNUNET_PROGRAM_run (argc, argv, "gnunet-config [OPTIONS]", | 177 | GNUNET_PROGRAM_run (argc, argv, "gnunet-config [OPTIONS]", |
179 | gettext_noop ("Manipulate GNUnet configuration files"), | 178 | gettext_noop ("Manipulate GNUnet configuration files"), |
180 | options, &run, NULL)) ? 0 : ret; | 179 | options, &run, NULL)) ? 0 : ret; |
180 | GNUNET_free ((void*) argv); | ||
181 | return ret; | ||
181 | } | 182 | } |
182 | 183 | ||
183 | /* end of gnunet-config.c */ | 184 | /* end of gnunet-config.c */ |
diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c index f966763a8..ad6b68a95 100644 --- a/src/util/gnunet-ecc.c +++ b/src/util/gnunet-ecc.c | |||
@@ -233,14 +233,17 @@ main (int argc, char *const *argv) | |||
233 | 0, &GNUNET_GETOPT_set_one, &weak_random }, | 233 | 0, &GNUNET_GETOPT_set_one, &weak_random }, |
234 | GNUNET_GETOPT_OPTION_END | 234 | GNUNET_GETOPT_OPTION_END |
235 | }; | 235 | }; |
236 | int ret; | ||
236 | 237 | ||
237 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 238 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
238 | return 2; | 239 | return 2; |
239 | 240 | ||
240 | return (GNUNET_OK == | 241 | ret = (GNUNET_OK == |
241 | GNUNET_PROGRAM_run (argc, argv, "gnunet-ecc [OPTIONS] keyfile", | 242 | GNUNET_PROGRAM_run (argc, argv, "gnunet-ecc [OPTIONS] keyfile", |
242 | gettext_noop ("Manipulate GNUnet private ECC key files"), | 243 | gettext_noop ("Manipulate GNUnet private ECC key files"), |
243 | options, &run, NULL)) ? 0 : 1; | 244 | options, &run, NULL)) ? 0 : 1; |
245 | GNUNET_free ((void*) argv); | ||
246 | return ret; | ||
244 | } | 247 | } |
245 | 248 | ||
246 | /* end of gnunet-ecc.c */ | 249 | /* end of gnunet-ecc.c */ |
diff --git a/src/util/gnunet-resolver.c b/src/util/gnunet-resolver.c index 559637748..6cb6ac564 100644 --- a/src/util/gnunet-resolver.c +++ b/src/util/gnunet-resolver.c | |||
@@ -149,14 +149,17 @@ main (int argc, char *const *argv) | |||
149 | 0, &GNUNET_GETOPT_set_one, &reverse }, | 149 | 0, &GNUNET_GETOPT_set_one, &reverse }, |
150 | GNUNET_GETOPT_OPTION_END | 150 | GNUNET_GETOPT_OPTION_END |
151 | }; | 151 | }; |
152 | int ret; | ||
152 | 153 | ||
153 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 154 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
154 | return 2; | 155 | return 2; |
155 | 156 | ||
156 | return (GNUNET_OK == | 157 | ret = (GNUNET_OK == |
157 | GNUNET_PROGRAM_run (argc, argv, "gnunet-resolver [hostname]", | 158 | GNUNET_PROGRAM_run (argc, argv, "gnunet-resolver [hostname]", |
158 | gettext_noop ("Use build-in GNUnet stub resolver"), | 159 | gettext_noop ("Use build-in GNUnet stub resolver"), |
159 | options, &run, NULL)) ? 0 : 1; | 160 | options, &run, NULL)) ? 0 : 1; |
161 | GNUNET_free ((void*) argv); | ||
162 | return ret; | ||
160 | } | 163 | } |
161 | 164 | ||
162 | /* end of gnunet-resolver.c */ | 165 | /* end of gnunet-resolver.c */ |
diff --git a/src/util/gnunet-rsa.c b/src/util/gnunet-rsa.c index d509bde67..597093ab1 100644 --- a/src/util/gnunet-rsa.c +++ b/src/util/gnunet-rsa.c | |||
@@ -222,7 +222,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
222 | * @return 0 ok, 1 on error | 222 | * @return 0 ok, 1 on error |
223 | */ | 223 | */ |
224 | int | 224 | int |
225 | main (int argc, char *const *argv) | 225 | main (int argc, char *const*argv) |
226 | { | 226 | { |
227 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | 227 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { |
228 | { 'g', "generate-keys", "COUNT", | 228 | { 'g', "generate-keys", "COUNT", |
@@ -242,14 +242,17 @@ main (int argc, char *const *argv) | |||
242 | 0, &GNUNET_GETOPT_set_one, &weak_random }, | 242 | 0, &GNUNET_GETOPT_set_one, &weak_random }, |
243 | GNUNET_GETOPT_OPTION_END | 243 | GNUNET_GETOPT_OPTION_END |
244 | }; | 244 | }; |
245 | int ret; | ||
245 | 246 | ||
246 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 247 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
247 | return 2; | 248 | return 2; |
248 | 249 | ||
249 | return (GNUNET_OK == | 250 | ret = (GNUNET_OK == |
250 | GNUNET_PROGRAM_run (argc, argv, "gnunet-rsa [OPTIONS] keyfile", | 251 | GNUNET_PROGRAM_run (argc, argv, "gnunet-rsa [OPTIONS] keyfile", |
251 | gettext_noop ("Manipulate GNUnet private RSA key files"), | 252 | gettext_noop ("Manipulate GNUnet private RSA key files"), |
252 | options, &run, NULL)) ? 0 : 1; | 253 | options, &run, NULL)) ? 0 : 1; |
254 | GNUNET_free ((void*) argv); | ||
255 | return ret; | ||
253 | } | 256 | } |
254 | 257 | ||
255 | /* end of gnunet-rsa.c */ | 258 | /* end of gnunet-rsa.c */ |
diff --git a/src/util/gnunet-uri.c b/src/util/gnunet-uri.c index 8cc813be5..5ca1f4efc 100644 --- a/src/util/gnunet-uri.c +++ b/src/util/gnunet-uri.c | |||
@@ -162,6 +162,7 @@ main (int argc, char *const *argv) | |||
162 | GNUNET_GETOPT_OPTION_END | 162 | GNUNET_GETOPT_OPTION_END |
163 | }; | 163 | }; |
164 | struct GNUNET_SIGNAL_Context *shc_chld; | 164 | struct GNUNET_SIGNAL_Context *shc_chld; |
165 | int ret; | ||
165 | 166 | ||
166 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 167 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
167 | return 2; | 168 | return 2; |
@@ -169,16 +170,15 @@ main (int argc, char *const *argv) | |||
169 | GNUNET_assert (sigpipe != NULL); | 170 | GNUNET_assert (sigpipe != NULL); |
170 | shc_chld = | 171 | shc_chld = |
171 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); | 172 | GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death); |
172 | if (GNUNET_OK != | 173 | ret = GNUNET_PROGRAM_run (argc, argv, "gnunet-uri URI", |
173 | GNUNET_PROGRAM_run (argc, argv, "gnunet-uri URI", | 174 | gettext_noop ("Perform default-actions for GNUnet URIs"), |
174 | gettext_noop ("Perform default-actions for GNUnet URIs"), | 175 | options, &run, NULL); |
175 | options, &run, NULL)) | ||
176 | return 1; | ||
177 | GNUNET_SIGNAL_handler_uninstall (shc_chld); | 176 | GNUNET_SIGNAL_handler_uninstall (shc_chld); |
178 | shc_chld = NULL; | 177 | shc_chld = NULL; |
179 | GNUNET_DISK_pipe_close (sigpipe); | 178 | GNUNET_DISK_pipe_close (sigpipe); |
180 | sigpipe = NULL; | 179 | sigpipe = NULL; |
181 | return ret; | 180 | GNUNET_free ((void *) argv); |
181 | return (GNUNET_OK == ret) ? 0 : 1; | ||
182 | } | 182 | } |
183 | 183 | ||
184 | /* end of gnunet-uri.c */ | 184 | /* end of gnunet-uri.c */ |
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index 3e0efa0bf..ef3eda2ff 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -65,7 +65,7 @@ get_path_from_proc_maps () | |||
65 | while (NULL != fgets (line, sizeof (line), f)) | 65 | while (NULL != fgets (line, sizeof (line), f)) |
66 | { | 66 | { |
67 | if ((1 == | 67 | if ((1 == |
68 | SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%s", dir)) && | 68 | SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%1023s", dir)) && |
69 | (NULL != (lgu = strstr (dir, "libgnunetutil")))) | 69 | (NULL != (lgu = strstr (dir, "libgnunetutil")))) |
70 | { | 70 | { |
71 | lgu[0] = '\0'; | 71 | lgu[0] = '\0'; |
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c index 4c6ae0039..7be48d0f9 100644 --- a/src/util/test_common_logging_runtime_loglevels.c +++ b/src/util/test_common_logging_runtime_loglevels.c | |||
@@ -42,6 +42,8 @@ static struct GNUNET_DISK_PipeHandle *pipe_stdout; | |||
42 | 42 | ||
43 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 43 | static GNUNET_SCHEDULER_TaskIdentifier die_task; |
44 | 44 | ||
45 | static GNUNET_SCHEDULER_TaskIdentifier read_task; | ||
46 | |||
45 | static void | 47 | static void |
46 | runone (void); | 48 | runone (void); |
47 | 49 | ||
@@ -60,6 +62,11 @@ end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
60 | GNUNET_OS_process_destroy (proc); | 62 | GNUNET_OS_process_destroy (proc); |
61 | proc = NULL; | 63 | proc = NULL; |
62 | } | 64 | } |
65 | if (GNUNET_SCHEDULER_NO_TASK != read_task) | ||
66 | { | ||
67 | GNUNET_SCHEDULER_cancel (read_task); | ||
68 | read_task = GNUNET_SCHEDULER_NO_TASK; | ||
69 | } | ||
63 | GNUNET_DISK_pipe_close (pipe_stdout); | 70 | GNUNET_DISK_pipe_close (pipe_stdout); |
64 | if (ok == 1) | 71 | if (ok == 1) |
65 | { | 72 | { |
@@ -167,6 +174,7 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
167 | long delays[8]; | 174 | long delays[8]; |
168 | int rd; | 175 | int rd; |
169 | 176 | ||
177 | read_task = GNUNET_SCHEDULER_NO_TASK; | ||
170 | rd = GNUNET_DISK_file_read (stdout_read_handle, buf_ptr, | 178 | rd = GNUNET_DISK_file_read (stdout_read_handle, buf_ptr, |
171 | sizeof (buf) - bytes); | 179 | sizeof (buf) - bytes); |
172 | if (rd > 0) | 180 | if (rd > 0) |
@@ -176,9 +184,9 @@ read_call (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
176 | #if VERBOSE | 184 | #if VERBOSE |
177 | FPRINTF (stderr, "got %d bytes, reading more\n", rd); | 185 | FPRINTF (stderr, "got %d bytes, reading more\n", rd); |
178 | #endif | 186 | #endif |
179 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, | 187 | read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, |
180 | stdout_read_handle, &read_call, | 188 | stdout_read_handle, &read_call, |
181 | (void *) stdout_read_handle); | 189 | stdout_read_handle); |
182 | return; | 190 | return; |
183 | } | 191 | } |
184 | 192 | ||
@@ -343,9 +351,9 @@ runone () | |||
343 | buf_ptr = buf; | 351 | buf_ptr = buf; |
344 | memset (&buf, 0, sizeof (buf)); | 352 | memset (&buf, 0, sizeof (buf)); |
345 | 353 | ||
346 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, | 354 | read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, |
347 | stdout_read_handle, &read_call, | 355 | stdout_read_handle, &read_call, |
348 | (void *) stdout_read_handle); | 356 | stdout_read_handle); |
349 | } | 357 | } |
350 | 358 | ||
351 | static void | 359 | static void |
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c index f732fbbdf..599451898 100644 --- a/src/util/test_os_start_process.c +++ b/src/util/test_os_start_process.c | |||
@@ -204,6 +204,7 @@ check_kill () | |||
204 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn, | 204 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR, hello_pipe_stdin, hello_pipe_stdout, fn, |
205 | "gnunet-service-resolver", "-", NULL); | 205 | "gnunet-service-resolver", "-", NULL); |
206 | sleep (1); /* give process time to start, so we actually use the pipe-kill mechanism! */ | 206 | sleep (1); /* give process time to start, so we actually use the pipe-kill mechanism! */ |
207 | GNUNET_free (fn); | ||
207 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 208 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) |
208 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 209 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
209 | GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proc)); | 210 | GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proc)); |
@@ -241,6 +242,7 @@ check_instant_kill () | |||
241 | { | 242 | { |
242 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 243 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
243 | } | 244 | } |
245 | GNUNET_free (fn); | ||
244 | GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proc)); | 246 | GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proc)); |
245 | GNUNET_OS_process_destroy (proc); | 247 | GNUNET_OS_process_destroy (proc); |
246 | proc = NULL; | 248 | proc = NULL; |
diff --git a/src/util/test_plugin.c b/src/util/test_plugin.c index 122d5f480..f2abfa77d 100644 --- a/src/util/test_plugin.c +++ b/src/util/test_plugin.c | |||
@@ -35,6 +35,7 @@ test_cb (void *cls, const char *libname, void *lib_ret) | |||
35 | ret = GNUNET_PLUGIN_unload (libname, "out"); | 35 | ret = GNUNET_PLUGIN_unload (libname, "out"); |
36 | GNUNET_assert (NULL != ret); | 36 | GNUNET_assert (NULL != ret); |
37 | GNUNET_assert (0 == strcmp (ret, "World")); | 37 | GNUNET_assert (0 == strcmp (ret, "World")); |
38 | GNUNET_free (ret); | ||
38 | } | 39 | } |
39 | 40 | ||
40 | 41 | ||
diff --git a/src/util/test_resolver_api_data.conf b/src/util/test_resolver_api_data.conf index 745cb7bbe..3e264ebb7 100644 --- a/src/util/test_resolver_api_data.conf +++ b/src/util/test_resolver_api_data.conf | |||
@@ -4,5 +4,4 @@ SERVICEHOME = /tmp/test-gnunetd-statistics/ | |||
4 | [resolver] | 4 | [resolver] |
5 | PORT = 22354 | 5 | PORT = 22354 |
6 | HOSTNAME = localhost | 6 | HOSTNAME = localhost |
7 | DEBUG = YES | ||
8 | 7 | ||
diff --git a/src/util/test_server_mst_interrupt.c b/src/util/test_server_mst_interrupt.c index fd34bd00a..8fd7a2b54 100644 --- a/src/util/test_server_mst_interrupt.c +++ b/src/util/test_server_mst_interrupt.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "gnunet_time_lib.h" | 30 | #include "gnunet_time_lib.h" |
31 | 31 | ||
32 | static struct GNUNET_SERVER_MessageStreamTokenizer * mst; | 32 | static struct GNUNET_SERVER_MessageStreamTokenizer * mst; |
33 | static int ret; | 33 | |
34 | 34 | ||
35 | /* Callback destroying mst with data in buffer */ | 35 | /* Callback destroying mst with data in buffer */ |
36 | static int | 36 | static int |
@@ -42,40 +42,23 @@ mst_cb (void *cls, void *client, | |||
42 | return GNUNET_SYSERR; | 42 | return GNUNET_SYSERR; |
43 | } | 43 | } |
44 | 44 | ||
45 | /** | ||
46 | * Main method | ||
47 | */ | ||
48 | static int | ||
49 | check () | ||
50 | { | ||
51 | 45 | ||
46 | int | ||
47 | main (int argc, char *argv[]) | ||
48 | { | ||
52 | struct GNUNET_PeerIdentity id; | 49 | struct GNUNET_PeerIdentity id; |
53 | struct GNUNET_MessageHeader msg[2]; | 50 | struct GNUNET_MessageHeader msg[2]; |
54 | 51 | ||
55 | /* Prepare */ | 52 | GNUNET_log_setup ("test_server_mst_interrupt", "WARNING", NULL); |
56 | memset (&id, sizeof (id), '\0'); | 53 | memset (&id, 0, sizeof (id)); |
57 | msg[0].size = htons (sizeof (msg)); | 54 | msg[0].size = htons (sizeof (msg)); |
58 | msg[0].type = htons (sizeof (GNUNET_MESSAGE_TYPE_DUMMY)); | 55 | msg[0].type = htons (sizeof (GNUNET_MESSAGE_TYPE_DUMMY)); |
59 | |||
60 | mst = GNUNET_SERVER_mst_create(mst_cb, NULL); | 56 | mst = GNUNET_SERVER_mst_create(mst_cb, NULL); |
61 | 57 | GNUNET_SERVER_mst_receive (mst, &id, | |
62 | GNUNET_SERVER_mst_receive(mst, &id, (const char *) &msg, 2 * sizeof (msg), GNUNET_NO, GNUNET_NO); | 58 | (const char *) &msg, 2 * sizeof (msg), |
63 | 59 | GNUNET_NO, GNUNET_NO); | |
64 | /* If we reach this line, it did not crash */ | 60 | /* If we reach this line, it did not crash */ |
65 | ret = 0; | 61 | return 0; |
66 | |||
67 | return ret; | ||
68 | } | ||
69 | |||
70 | int | ||
71 | main (int argc, char *argv[]) | ||
72 | { | ||
73 | ret = 1; | ||
74 | |||
75 | GNUNET_log_setup ("test_server", "WARNING", NULL); | ||
76 | check (); | ||
77 | |||
78 | return ret; | ||
79 | } | 62 | } |
80 | 63 | ||
81 | /* end of test_server_mst_interrupt.c */ | 64 | /* end of test_server_mst_interrupt.c */ |
diff --git a/src/vpn/gnunet-vpn.c b/src/vpn/gnunet-vpn.c index a03a12e87..61d145c6e 100644 --- a/src/vpn/gnunet-vpn.c +++ b/src/vpn/gnunet-vpn.c | |||
@@ -323,15 +323,16 @@ main (int argc, char *const *argv) | |||
323 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), | 323 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), |
324 | GNUNET_GETOPT_OPTION_END | 324 | GNUNET_GETOPT_OPTION_END |
325 | }; | 325 | }; |
326 | |||
327 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) | 326 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) |
328 | return 2; | 327 | return 2; |
329 | 328 | ||
330 | return (GNUNET_OK == | 329 | ret = (GNUNET_OK == |
331 | GNUNET_PROGRAM_run (argc, argv, "gnunet-vpn", | 330 | GNUNET_PROGRAM_run (argc, argv, "gnunet-vpn", |
332 | gettext_noop | 331 | gettext_noop |
333 | ("Setup tunnels via VPN."), options, | 332 | ("Setup tunnels via VPN."), options, |
334 | &run, NULL)) ? ret : 1; | 333 | &run, NULL)) ? ret : 1; |
334 | GNUNET_free ((void *) argv); | ||
335 | return ret; | ||
335 | } | 336 | } |
336 | 337 | ||
337 | 338 | ||