aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2023-10-05 07:56:35 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2023-10-05 07:56:35 +0200
commit53e3a0e32e24629b25a64d7572bc350f69608fac (patch)
treef33043aac7f2d8fbf44a7540d9d25217ecbb912a /src
parent96c6d62c6a149b0645b6a2a487a7e24e09b5fbc9 (diff)
downloadgnunet-53e3a0e32e24629b25a64d7572bc350f69608fac.tar.gz
gnunet-53e3a0e32e24629b25a64d7572bc350f69608fac.zip
Fix warnings; CADET not FTBFS because old hello removed
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_hello.c2
-rw-r--r--src/gnsrecord/gnsrecord_misc.c1
-rw-r--r--src/hello/Makefile.am20
-rw-r--r--src/peerstore/gnunet-service-peerstore.c13
-rw-r--r--src/peerstore/peerstore_api.c9
-rw-r--r--src/sq/sq.c1
-rw-r--r--src/sq/sq_prepare.c1
-rw-r--r--src/testing/testing_api_cmd_barrier_reached.c2
-rw-r--r--src/testing/testing_api_cmd_block_until_external_trigger.c4
-rw-r--r--src/testing/testing_api_cmd_exec_bash_script.c17
-rw-r--r--src/topology/gnunet-daemon-topology.c6
-rw-r--r--src/transport/gnunet-service-tng.c4
-rw-r--r--src/transport/test_transport_plugin_cmd_nat_upnp.c21
-rw-r--r--src/transport/test_transport_plugin_cmd_simple_send.c4
-rw-r--r--src/transport/test_transport_plugin_cmd_simple_send_broadcast.c4
-rw-r--r--src/transport/test_transport_plugin_cmd_simple_send_dv.c6
-rw-r--r--src/transport/test_transport_plugin_cmd_simple_send_performance.c21
-rw-r--r--src/transport/test_transport_plugin_cmd_udp_backchannel.c2
-rw-r--r--src/transport/transport-testing-communicator.c4
-rw-r--r--src/transport/transport_api2_core.c4
-rw-r--r--src/transport/transport_api_cmd_backchannel_check.c1
-rw-r--r--src/transport/transport_api_cmd_connecting_peers.c1
-rw-r--r--src/util/bio.c1
-rw-r--r--src/util/configuration.c1
-rw-r--r--src/util/container_heap.c1
-rw-r--r--src/util/container_multihashmap.c1
-rw-r--r--src/util/container_multishortmap.c1
-rw-r--r--src/util/container_multiuuidmap.c1
28 files changed, 52 insertions, 102 deletions
diff --git a/src/cadet/gnunet-service-cadet_hello.c b/src/cadet/gnunet-service-cadet_hello.c
index 1e3322733..135fde25a 100644
--- a/src/cadet/gnunet-service-cadet_hello.c
+++ b/src/cadet/gnunet-service-cadet_hello.c
@@ -84,7 +84,7 @@ got_hello (void *cls,
84 LOG (GNUNET_ERROR_TYPE_DEBUG, 84 LOG (GNUNET_ERROR_TYPE_DEBUG,
85 "Hello for %s (%d bytes), expires on %s\n", 85 "Hello for %s (%d bytes), expires on %s\n",
86 GNUNET_i2s (id), 86 GNUNET_i2s (id),
87 sizeof (hello), 87 ntohs (hello->size),
88 GNUNET_STRINGS_absolute_time_to_string ( 88 GNUNET_STRINGS_absolute_time_to_string (
89 GNUNET_HELLO_builder_get_expiration_time (hello))); 89 GNUNET_HELLO_builder_get_expiration_time (hello)));
90 peer = GCP_get (id, 90 peer = GCP_get (id,
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index 4727842ea..931654c49 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -25,7 +25,6 @@
25 * @author Matthias Wachs 25 * @author Matthias Wachs
26 * @author Christian Grothoff 26 * @author Christian Grothoff
27 */ 27 */
28#include "gnunet_common.h"
29#include "platform.h" 28#include "platform.h"
30#include "gnunet_util_lib.h" 29#include "gnunet_util_lib.h"
31#include "gnunet_constants.h" 30#include "gnunet_constants.h"
diff --git a/src/hello/Makefile.am b/src/hello/Makefile.am
index c04b85106..5b923055b 100644
--- a/src/hello/Makefile.am
+++ b/src/hello/Makefile.am
@@ -9,7 +9,6 @@ endif
9lib_LTLIBRARIES = libgnunethello.la 9lib_LTLIBRARIES = libgnunethello.la
10 10
11libgnunethello_la_SOURCES = \ 11libgnunethello_la_SOURCES = \
12 hello.c \
13 address.c \ 12 address.c \
14 hello-ng.c \ 13 hello-ng.c \
15 hello-uri.c 14 hello-uri.c
@@ -20,8 +19,8 @@ libgnunethello_la_LDFLAGS = \
20 $(GN_LIB_LDFLAGS) \ 19 $(GN_LIB_LDFLAGS) \
21 -version-info 1:0:1 20 -version-info 1:0:1
22 21
23noinst_PROGRAMS = \ 22#noinst_PROGRAMS = \
24 gnunet-hello 23# gnunet-hello
25 24
26check_PROGRAMS = \ 25check_PROGRAMS = \
27 test_hello \ 26 test_hello \
@@ -60,10 +59,11 @@ test_friend_hello_LDADD = \
60 libgnunethello.la \ 59 libgnunethello.la \
61 $(top_builddir)/src/util/libgnunetutil.la 60 $(top_builddir)/src/util/libgnunetutil.la
62 61
63gnunet_hello_SOURCES = \ 62# Not TNG ready
64 gnunet-hello.c 63#gnunet_hello_SOURCES = \
65gnunet_hello_LDADD = \ 64# gnunet-hello.c
66 libgnunethello.la \ 65#gnunet_hello_LDADD = \
67 $(top_builddir)/src/util/libgnunetutil.la 66# libgnunethello.la \
68gnunet_hello_LDFLAGS = \ 67# $(top_builddir)/src/util/libgnunetutil.la
69 $(GN_LIBINTL) 68#gnunet_hello_LDFLAGS = \
69# $(GN_LIBINTL)
diff --git a/src/peerstore/gnunet-service-peerstore.c b/src/peerstore/gnunet-service-peerstore.c
index 06333afeb..4c05a14fc 100644
--- a/src/peerstore/gnunet-service-peerstore.c
+++ b/src/peerstore/gnunet-service-peerstore.c
@@ -536,7 +536,7 @@ handle_store (void *cls, const struct StoreRecordMessage *srm)
536static void 536static void
537store_hello_continuation (void *cls, int success) 537store_hello_continuation (void *cls, int success)
538{ 538{
539 (void *) cls; 539 (void) cls;
540 540
541 if (GNUNET_OK != success) 541 if (GNUNET_OK != success)
542 { 542 {
@@ -550,7 +550,7 @@ store_hello_continuation (void *cls, int success)
550static int 550static int
551hosts_directory_scan_callback (void *cls, const char *fullname) 551hosts_directory_scan_callback (void *cls, const char *fullname)
552{ 552{
553 (void *) cls; 553 (void) cls;
554 const char *filename; 554 const char *filename;
555 ssize_t size_total; 555 ssize_t size_total;
556 char buffer[GNUNET_MAX_MESSAGE_SIZE - 1] GNUNET_ALIGN; 556 char buffer[GNUNET_MAX_MESSAGE_SIZE - 1] GNUNET_ALIGN;
@@ -568,7 +568,7 @@ hosts_directory_scan_callback (void *cls, const char *fullname)
568 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 568 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
569 "2 hosts_directory_scan_callback filename %s\n", 569 "2 hosts_directory_scan_callback filename %s\n",
570 fullname); 570 fullname);
571 571
572 /* filename = strrchr (fullname, DIR_SEPARATOR); */ 572 /* filename = strrchr (fullname, DIR_SEPARATOR); */
573 /* if ((NULL == filename) || (1 > strlen (filename))) */ 573 /* if ((NULL == filename) || (1 > strlen (filename))) */
574 /* filename = fullname; */ 574 /* filename = fullname; */
@@ -578,7 +578,7 @@ hosts_directory_scan_callback (void *cls, const char *fullname)
578 /* GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, */ 578 /* GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, */
579 /* "3 hosts_directory_scan_callback filename %s\n", */ 579 /* "3 hosts_directory_scan_callback filename %s\n", */
580 /* filename); */ 580 /* filename); */
581 581
582 /* if (GNUNET_YES != GNUNET_DISK_file_test (filename)) */ 582 /* if (GNUNET_YES != GNUNET_DISK_file_test (filename)) */
583 /* return GNUNET_OK; */ 583 /* return GNUNET_OK; */
584 size_total = GNUNET_DISK_fn_read (fullname, buffer, sizeof(buffer)); 584 size_total = GNUNET_DISK_fn_read (fullname, buffer, sizeof(buffer));
@@ -604,7 +604,7 @@ hosts_directory_scan_callback (void *cls, const char *fullname)
604 pid, 604 pid,
605 "", 605 "",
606 hello, 606 hello,
607 sizeof (hello), 607 size_total,
608 GNUNET_TIME_UNIT_FOREVER_ABS, 608 GNUNET_TIME_UNIT_FOREVER_ABS,
609 GNUNET_PEERSTORE_STOREOPTION_REPLACE, 609 GNUNET_PEERSTORE_STOREOPTION_REPLACE,
610 &store_hello_continuation, 610 &store_hello_continuation,
@@ -613,6 +613,7 @@ hosts_directory_scan_callback (void *cls, const char *fullname)
613 GNUNET_break (0); 613 GNUNET_break (0);
614 } 614 }
615 GNUNET_HELLO_builder_free (builder); 615 GNUNET_HELLO_builder_free (builder);
616 return GNUNET_OK;
616} 617}
617 618
618 619
@@ -636,7 +637,7 @@ run (void *cls,
636 in_shutdown = GNUNET_NO; 637 in_shutdown = GNUNET_NO;
637 num_clients = 0; 638 num_clients = 0;
638 cfg = c; 639 cfg = c;
639 640
640 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, 641 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg,
641 "peerstore", 642 "peerstore",
642 "DATABASE", 643 "DATABASE",
diff --git a/src/peerstore/peerstore_api.c b/src/peerstore/peerstore_api.c
index df1971c4e..e2ed06d28 100644
--- a/src/peerstore/peerstore_api.c
+++ b/src/peerstore/peerstore_api.c
@@ -1139,7 +1139,7 @@ hello_updated (void *cls,
1139 hello = record->value; 1139 hello = record->value;
1140 builder = GNUNET_HELLO_builder_from_msg (hello); 1140 builder = GNUNET_HELLO_builder_from_msg (hello);
1141 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1141 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1142 "hello_updated with expired %s and size %lu for peer %s\n", 1142 "hello_updated with expired %s and size %u for peer %s\n",
1143 GNUNET_STRINGS_absolute_time_to_string (GNUNET_HELLO_builder_get_expiration_time (hello)), 1143 GNUNET_STRINGS_absolute_time_to_string (GNUNET_HELLO_builder_get_expiration_time (hello)),
1144 ntohs (hello->size), 1144 ntohs (hello->size),
1145 GNUNET_i2s (&record->peer)); 1145 GNUNET_i2s (&record->peer));
@@ -1355,7 +1355,7 @@ GNUNET_PEERSTORE_hello_add (struct GNUNET_PEERSTORE_Handle *h,
1355 huc->pid = GNUNET_malloc (pid_size); 1355 huc->pid = GNUNET_malloc (pid_size);
1356 GNUNET_memcpy (huc->pid, pid, pid_size); 1356 GNUNET_memcpy (huc->pid, pid, pid_size);
1357 LOG (GNUNET_ERROR_TYPE_DEBUG, 1357 LOG (GNUNET_ERROR_TYPE_DEBUG,
1358 "Adding hello for peer %s with expiration %s msg size %lu\n", 1358 "Adding hello for peer %s with expiration %s msg size %u\n",
1359 GNUNET_i2s (huc->pid), 1359 GNUNET_i2s (huc->pid),
1360 GNUNET_STRINGS_absolute_time_to_string (huc_exp), 1360 GNUNET_STRINGS_absolute_time_to_string (huc_exp),
1361 size_msg); 1361 size_msg);
@@ -1376,9 +1376,10 @@ free_store_context(void *cls,
1376 const struct GNUNET_PeerIdentity *key, 1376 const struct GNUNET_PeerIdentity *key,
1377 void *value) 1377 void *value)
1378{ 1378{
1379 (void *) cls; 1379 (void) cls;
1380 1380
1381 GNUNET_PEERSTORE_store_cancel ((struct GNUNET_PEERSTORE_StoreContext *) value); 1381 GNUNET_PEERSTORE_store_cancel ((struct GNUNET_PEERSTORE_StoreContext *) value);
1382 return GNUNET_YES; // FIXME why is this a map anyway
1382} 1383}
1383 1384
1384 1385
@@ -1386,8 +1387,6 @@ void
1386GNUNET_PEERSTORE_hello_add_cancel (struct 1387GNUNET_PEERSTORE_hello_add_cancel (struct
1387 GNUNET_PEERSTORE_StoreHelloContext *huc) 1388 GNUNET_PEERSTORE_StoreHelloContext *huc)
1388{ 1389{
1389 struct GNUNET_PEERSTORE_StoreContext *sc;
1390
1391 GNUNET_PEERSTORE_watch_cancel (huc->wc); 1390 GNUNET_PEERSTORE_watch_cancel (huc->wc);
1392 GNUNET_CONTAINER_multipeermap_iterate (huc->store_context_map, 1391 GNUNET_CONTAINER_multipeermap_iterate (huc->store_context_map,
1393 free_store_context, 1392 free_store_context,
diff --git a/src/sq/sq.c b/src/sq/sq.c
index 557ec2771..96d1d333d 100644
--- a/src/sq/sq.c
+++ b/src/sq/sq.c
@@ -22,7 +22,6 @@
22 * @brief helper functions for Sqlite3 DB interactions 22 * @brief helper functions for Sqlite3 DB interactions
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25#include "gnunet_common.h"
26#include "platform.h" 25#include "platform.h"
27#include "gnunet_sq_lib.h" 26#include "gnunet_sq_lib.h"
28 27
diff --git a/src/sq/sq_prepare.c b/src/sq/sq_prepare.c
index 1df564bfb..d1ca0e8bd 100644
--- a/src/sq/sq_prepare.c
+++ b/src/sq/sq_prepare.c
@@ -22,7 +22,6 @@
22 * @brief helper functions for executing SQL statements 22 * @brief helper functions for executing SQL statements
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25#include "gnunet_common.h"
26#include "platform.h" 25#include "platform.h"
27#include "gnunet_sq_lib.h" 26#include "gnunet_sq_lib.h"
28 27
diff --git a/src/testing/testing_api_cmd_barrier_reached.c b/src/testing/testing_api_cmd_barrier_reached.c
index 0075f8ef0..161240d4d 100644
--- a/src/testing/testing_api_cmd_barrier_reached.c
+++ b/src/testing/testing_api_cmd_barrier_reached.c
@@ -181,7 +181,7 @@ barrier_reached_traits (void *cls,
181 struct GNUNET_TESTING_AsyncContext *ac = &brs->ac; 181 struct GNUNET_TESTING_AsyncContext *ac = &brs->ac;
182 182
183 struct GNUNET_TESTING_Trait traits[] = { 183 struct GNUNET_TESTING_Trait traits[] = {
184 GNUNET_TESTING_make_trait_async_context ((const void *) ac), 184 GNUNET_TESTING_make_trait_async_context (ac),
185 GNUNET_TESTING_trait_end () 185 GNUNET_TESTING_trait_end ()
186 }; 186 };
187 187
diff --git a/src/testing/testing_api_cmd_block_until_external_trigger.c b/src/testing/testing_api_cmd_block_until_external_trigger.c
index 58f095842..6a3b00e51 100644
--- a/src/testing/testing_api_cmd_block_until_external_trigger.c
+++ b/src/testing/testing_api_cmd_block_until_external_trigger.c
@@ -58,8 +58,8 @@ block_until_external_trigger_traits (void *cls,
58 struct GNUNET_TESTING_BlockState *bs = cls; 58 struct GNUNET_TESTING_BlockState *bs = cls;
59 struct GNUNET_TESTING_AsyncContext *ac = &bs->ac; 59 struct GNUNET_TESTING_AsyncContext *ac = &bs->ac;
60 struct GNUNET_TESTING_Trait traits[] = { 60 struct GNUNET_TESTING_Trait traits[] = {
61 GNUNET_TESTING_make_trait_async_context ((const void *) ac), 61 GNUNET_TESTING_make_trait_async_context (ac),
62 GNUNET_TESTING_make_trait_block_state ((const void *) bs), 62 GNUNET_TESTING_make_trait_block_state (bs),
63 GNUNET_TESTING_trait_end () 63 GNUNET_TESTING_trait_end ()
64 }; 64 };
65 65
diff --git a/src/testing/testing_api_cmd_exec_bash_script.c b/src/testing/testing_api_cmd_exec_bash_script.c
index 5b9f5cbbb..7e7aafb69 100644
--- a/src/testing/testing_api_cmd_exec_bash_script.c
+++ b/src/testing/testing_api_cmd_exec_bash_script.c
@@ -37,7 +37,7 @@ struct BashScriptState
37 struct GNUNET_TESTING_AsyncContext ac; 37 struct GNUNET_TESTING_AsyncContext ac;
38 38
39 /** 39 /**
40 * Callback handed over to the command, which should 40 * Callback handed over to the command, which should
41 * be called upon death or completion of the script. 41 * be called upon death or completion of the script.
42 */ 42 */
43 GNUNET_ChildCompletedCallback cb; 43 GNUNET_ChildCompletedCallback cb;
@@ -55,13 +55,13 @@ struct BashScriptState
55 */ 55 */
56 const char *script; 56 const char *script;
57 57
58 58
59 /** 59 /**
60 * Arguments for the script 60 * Arguments for the script
61 */ 61 */
62 char **script_argv; 62 char **script_argv;
63 63
64 /** 64 /**
65 * Size of script_argv. 65 * Size of script_argv.
66 */ 66 */
67 int argc; 67 int argc;
@@ -115,8 +115,7 @@ child_completed_callback (void *cls,
115 if (0 == exit_code) 115 if (0 == exit_code)
116 { 116 {
117 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 117 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
118 "Child succeeded!\n", 118 "Child succeeded!\n");
119 exit_code);
120 GNUNET_TESTING_async_finish (&bss->ac); 119 GNUNET_TESTING_async_finish (&bss->ac);
121 } 120 }
122 else 121 else
@@ -141,7 +140,7 @@ exec_bash_script_run (void *cls,
141 struct BashScriptState *bss = cls; 140 struct BashScriptState *bss = cls;
142 enum GNUNET_GenericReturnValue helper_check; 141 enum GNUNET_GenericReturnValue helper_check;
143 char *argv[bss->argc + 2]; 142 char *argv[bss->argc + 2];
144 143
145 char *data_dir; 144 char *data_dir;
146 char *script_name; 145 char *script_name;
147 146
@@ -180,7 +179,7 @@ exec_bash_script_run (void *cls,
180 argv[i + 1] = bss->script_argv[i]; 179 argv[i + 1] = bss->script_argv[i];
181 } 180 }
182 argv[bss->argc] = NULL; 181 argv[bss->argc] = NULL;
183 182
184 bss->start_proc = GNUNET_OS_start_process_vap (GNUNET_OS_INHERIT_STD_ERR, 183 bss->start_proc = GNUNET_OS_start_process_vap (GNUNET_OS_INHERIT_STD_ERR,
185 NULL, 184 NULL,
186 NULL, 185 NULL,
@@ -204,7 +203,7 @@ GNUNET_TESTING_cmd_exec_bash_script (const char *label,
204 203
205 bss = GNUNET_new (struct BashScriptState); 204 bss = GNUNET_new (struct BashScriptState);
206 bss->script = script; 205 bss->script = script;
207 bss->script_argv = script_argv; 206 bss->script_argv = script_argv; // FIXME this is not just a cast to fix
208 bss->argc = argc; 207 bss->argc = argc;
209 bss->cb = cb; 208 bss->cb = cb;
210 209
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index efe014776..fa8640bf4 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -126,7 +126,7 @@ struct Peer
126 126
127 127
128/** 128/**
129 * The task to delayed start the notification process intially. 129 * The task to delayed start the notification process intially.
130 * We like to give transport some time to give us our hello to distribute it. 130 * We like to give transport some time to give us our hello to distribute it.
131 */ 131 */
132struct GNUNET_SCHEDULER_Task *peerstore_notify_task; 132struct GNUNET_SCHEDULER_Task *peerstore_notify_task;
@@ -551,7 +551,7 @@ reschedule_hellos (void *cls,
551 const struct GNUNET_PeerIdentity *pid, 551 const struct GNUNET_PeerIdentity *pid,
552 void *value) 552 void *value)
553{ 553{
554 (void *) cls; 554 (void) cls;
555 struct Peer *peer = value; 555 struct Peer *peer = value;
556 556
557 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 557 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -878,7 +878,7 @@ process_peer (void *cls,
878static void 878static void
879start_notify (void *cls) 879start_notify (void *cls)
880{ 880{
881 (void *) cls; 881 (void) cls;
882 882
883 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting to process new hellos for gossiping.\n"); 883 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting to process new hellos for gossiping.\n");
884 peerstore_notify = 884 peerstore_notify =
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index f2ee685bc..7a7603e91 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -11243,7 +11243,7 @@ hello_for_client_cb (void *cls,
11243 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 11243 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
11244 "hello for client %s\n", 11244 "hello for client %s\n",
11245 address); 11245 address);
11246 11246
11247 start_address_validation (peer, address); 11247 start_address_validation (peer, address);
11248 GNUNET_free (address); 11248 GNUNET_free (address);
11249} 11249}
@@ -11262,7 +11262,7 @@ handle_hello_for_client (void *cls,
11262 const struct GNUNET_MessageHeader *hello, 11262 const struct GNUNET_MessageHeader *hello,
11263 const char *emsg) 11263 const char *emsg)
11264{ 11264{
11265 (void *) cls; 11265 (void) cls;
11266 const char *val; 11266 const char *val;
11267 struct GNUNET_HELLO_Builder *builder; 11267 struct GNUNET_HELLO_Builder *builder;
11268 11268
diff --git a/src/transport/test_transport_plugin_cmd_nat_upnp.c b/src/transport/test_transport_plugin_cmd_nat_upnp.c
index 31206e63f..82623ece7 100644
--- a/src/transport/test_transport_plugin_cmd_nat_upnp.c
+++ b/src/transport/test_transport_plugin_cmd_nat_upnp.c
@@ -75,7 +75,7 @@ static void
75handle_test (void *cls, 75handle_test (void *cls,
76 const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) 76 const struct GNUNET_TRANSPORT_TESTING_TestMessage *message)
77{ 77{
78 const struct GNUNET_TESTING_AsyncContext *ac; 78 struct GNUNET_TESTING_AsyncContext *ac;
79 79
80 GNUNET_TESTING_get_trait_async_context (&block_receive, 80 GNUNET_TESTING_get_trait_async_context (&block_receive,
81 &ac); 81 &ac);
@@ -112,25 +112,6 @@ get_waiting_for_barriers ()
112 112
113 113
114/** 114/**
115 * Callback to set the flag indicating all peers started. Will be called via the plugin api.
116 *
117 */
118static void
119all_peers_started ()
120{
121 const struct GNUNET_TESTING_AsyncContext *ac;
122
123 GNUNET_TESTING_get_trait_async_context (&block_send,
124 &ac);
125 GNUNET_assert (NULL != ac);
126 if (NULL == ac->cont)
127 GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac);
128 else
129 GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac);
130}
131
132
133/**
134 * Function called with the final result of the test. 115 * Function called with the final result of the test.
135 * 116 *
136 * @param cls the `struct MainParams` 117 * @param cls the `struct MainParams`
diff --git a/src/transport/test_transport_plugin_cmd_simple_send.c b/src/transport/test_transport_plugin_cmd_simple_send.c
index d83c539fa..c6d75cce4 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send.c
@@ -75,7 +75,7 @@ static void
75handle_test (void *cls, 75handle_test (void *cls,
76 const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) 76 const struct GNUNET_TRANSPORT_TESTING_TestMessage *message)
77{ 77{
78 const struct GNUNET_TESTING_AsyncContext *ac; 78 struct GNUNET_TESTING_AsyncContext *ac;
79 79
80 GNUNET_TESTING_get_trait_async_context (&block_receive, 80 GNUNET_TESTING_get_trait_async_context (&block_receive,
81 &ac); 81 &ac);
@@ -102,7 +102,7 @@ get_waiting_for_barriers ()
102static void 102static void
103all_peers_started () 103all_peers_started ()
104{ 104{
105 const struct GNUNET_TESTING_AsyncContext *ac; 105 struct GNUNET_TESTING_AsyncContext *ac;
106 106
107 GNUNET_TESTING_get_trait_async_context (&block_send, 107 GNUNET_TESTING_get_trait_async_context (&block_send,
108 &ac); 108 &ac);
diff --git a/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c b/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c
index 7000851c4..d2870ab34 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send_broadcast.c
@@ -75,7 +75,7 @@ static void
75handle_test (void *cls, 75handle_test (void *cls,
76 const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) 76 const struct GNUNET_TRANSPORT_TESTING_TestMessage *message)
77{ 77{
78 const struct GNUNET_TESTING_AsyncContext *ac; 78 struct GNUNET_TESTING_AsyncContext *ac;
79 79
80 GNUNET_TESTING_get_trait_async_context (&block_receive, 80 GNUNET_TESTING_get_trait_async_context (&block_receive,
81 &ac); 81 &ac);
@@ -102,7 +102,7 @@ get_waiting_for_barriers ()
102static void 102static void
103all_peers_started () 103all_peers_started ()
104{ 104{
105 const struct GNUNET_TESTING_AsyncContext *ac; 105 struct GNUNET_TESTING_AsyncContext *ac;
106 106
107 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 107 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
108 "Received message\n"); 108 "Received message\n");
diff --git a/src/transport/test_transport_plugin_cmd_simple_send_dv.c b/src/transport/test_transport_plugin_cmd_simple_send_dv.c
index c07fd3cf4..d35672cd9 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send_dv.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send_dv.c
@@ -84,7 +84,7 @@ handle_test (void *cls,
84 const struct GNUNET_TRANSPORT_TESTING_TestMessage *message) 84 const struct GNUNET_TRANSPORT_TESTING_TestMessage *message)
85{ 85{
86 struct GNUNET_PeerIdentity *peer = cls; 86 struct GNUNET_PeerIdentity *peer = cls;
87 const struct GNUNET_TESTING_AsyncContext *ac_block; 87 struct GNUNET_TESTING_AsyncContext *ac_block;
88 const struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map; 88 const struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map;
89 unsigned int connected; 89 unsigned int connected;
90 struct GNUNET_TESTING_BlockState *bs; 90 struct GNUNET_TESTING_BlockState *bs;
@@ -129,7 +129,7 @@ handle_test (void *cls,
129 { 129 {
130 GNUNET_TESTING_get_trait_block_state ( 130 GNUNET_TESTING_get_trait_block_state (
131 &block_receive, 131 &block_receive,
132 (const struct GNUNET_TESTING_BlockState **) &bs); 132 &bs);
133 bs->asynchronous_finish = GNUNET_YES; 133 bs->asynchronous_finish = GNUNET_YES;
134 } 134 }
135 135
@@ -154,7 +154,7 @@ get_waiting_for_barriers ()
154static void 154static void
155all_peers_started () 155all_peers_started ()
156{ 156{
157 const struct GNUNET_TESTING_AsyncContext *ac; 157 struct GNUNET_TESTING_AsyncContext *ac;
158 158
159 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 159 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
160 "Received message\n"); 160 "Received message\n");
diff --git a/src/transport/test_transport_plugin_cmd_simple_send_performance.c b/src/transport/test_transport_plugin_cmd_simple_send_performance.c
index 931801d77..c4158f472 100644
--- a/src/transport/test_transport_plugin_cmd_simple_send_performance.c
+++ b/src/transport/test_transport_plugin_cmd_simple_send_performance.c
@@ -104,7 +104,7 @@ handle_test (void *cls,
104 GNUNET_TRANSPORT_TESTING_PerformanceTestMessage *message) 104 GNUNET_TRANSPORT_TESTING_PerformanceTestMessage *message)
105{ 105{
106 struct GNUNET_PeerIdentity *peer = cls; 106 struct GNUNET_PeerIdentity *peer = cls;
107 const struct GNUNET_TESTING_AsyncContext *ac; 107 struct GNUNET_TESTING_AsyncContext *ac;
108 struct Sender *sender; 108 struct Sender *sender;
109 struct GNUNET_TIME_Absolute time_send; 109 struct GNUNET_TIME_Absolute time_send;
110 struct GNUNET_TIME_Absolute now; 110 struct GNUNET_TIME_Absolute now;
@@ -218,25 +218,6 @@ get_waiting_for_barriers ()
218 218
219 219
220/** 220/**
221 * Callback to set the flag indicating all peers started. Will be called via the plugin api.
222 *
223 */
224static void
225all_peers_started ()
226{
227 const struct GNUNET_TESTING_AsyncContext *ac;
228
229 GNUNET_TESTING_get_trait_async_context (&block_send,
230 &ac);
231 GNUNET_assert (NULL != ac);
232 if (NULL == ac->cont)
233 GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) ac);
234 else
235 GNUNET_TESTING_async_finish ((struct GNUNET_TESTING_AsyncContext *) ac);
236}
237
238
239/**
240 * Function called with the final result of the test. 221 * Function called with the final result of the test.
241 * 222 *
242 * @param cls the `struct MainParams` 223 * @param cls the `struct MainParams`
diff --git a/src/transport/test_transport_plugin_cmd_udp_backchannel.c b/src/transport/test_transport_plugin_cmd_udp_backchannel.c
index 303790afc..378caf7df 100644
--- a/src/transport/test_transport_plugin_cmd_udp_backchannel.c
+++ b/src/transport/test_transport_plugin_cmd_udp_backchannel.c
@@ -100,7 +100,7 @@ get_waiting_for_barriers ()
100static void 100static void
101all_peers_started () 101all_peers_started ()
102{ 102{
103 const struct GNUNET_TESTING_AsyncContext *ac; 103 struct GNUNET_TESTING_AsyncContext *ac;
104 104
105 GNUNET_TESTING_get_trait_async_context (&block_send, 105 GNUNET_TESTING_get_trait_async_context (&block_send,
106 &ac); 106 &ac);
diff --git a/src/transport/transport-testing-communicator.c b/src/transport/transport-testing-communicator.c
index 26895e457..196dbdc39 100644
--- a/src/transport/transport-testing-communicator.c
+++ b/src/transport/transport-testing-communicator.c
@@ -1203,7 +1203,7 @@ GNUNET_TRANSPORT_TESTING_transport_communicator_send
1203 if (last_queue != tc_queue) 1203 if (last_queue != tc_queue)
1204 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1204 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1205 "Selected sending queue changed to %u with length %lu and MTU %u\n", 1205 "Selected sending queue changed to %u with length %lu and MTU %u\n",
1206 ntohl (tc_queue->qid), tc_queue->q_len, tc_queue->mtu); 1206 ntohl (tc_queue->qid), (unsigned long) tc_queue->q_len, tc_queue->mtu);
1207 GNUNET_assert (NULL != tc_queue); 1207 GNUNET_assert (NULL != tc_queue);
1208 last_queue = tc_queue; 1208 last_queue = tc_queue;
1209 // Uncomment this for alternativ 1 of backchannel functionality 1209 // Uncomment this for alternativ 1 of backchannel functionality
@@ -1215,7 +1215,7 @@ GNUNET_TRANSPORT_TESTING_transport_communicator_send
1215 if (msg_count % 100 == 0) 1215 if (msg_count % 100 == 0)
1216 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1216 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1217 "Sending %u-th (%lu-th for queue) message on queue %u\n", 1217 "Sending %u-th (%lu-th for queue) message on queue %u\n",
1218 msg_count, tc_queue->mid, ntohl (tc_queue->qid)); 1218 msg_count, (unsigned long) tc_queue->mid, ntohl (tc_queue->qid));
1219 inbox_size = sizeof (struct GNUNET_MessageHeader) + payload_size; 1219 inbox_size = sizeof (struct GNUNET_MessageHeader) + payload_size;
1220 env = GNUNET_MQ_msg_extra (msg, 1220 env = GNUNET_MQ_msg_extra (msg,
1221 inbox_size, 1221 inbox_size,
diff --git a/src/transport/transport_api2_core.c b/src/transport/transport_api2_core.c
index c2beee779..0d2a0ac7f 100644
--- a/src/transport/transport_api2_core.c
+++ b/src/transport/transport_api2_core.c
@@ -407,8 +407,8 @@ peer_mq_error_handler (void *cls, enum GNUNET_MQ_Error error)
407 if (GNUNET_MQ_ERROR_MALFORMED == error) 407 if (GNUNET_MQ_ERROR_MALFORMED == error)
408 GNUNET_break_op (0); 408 GNUNET_break_op (0);
409 //TODO Look into bug #7887 409 //TODO Look into bug #7887
410 410
411 GNUNET_TRANSPORT_core_receive_continue (n->h, (const struct PeerIdentity *) &n->id); 411 GNUNET_TRANSPORT_core_receive_continue (n->h, &n->id);
412} 412}
413 413
414 414
diff --git a/src/transport/transport_api_cmd_backchannel_check.c b/src/transport/transport_api_cmd_backchannel_check.c
index 1bdb8817f..68bdae69c 100644
--- a/src/transport/transport_api_cmd_backchannel_check.c
+++ b/src/transport/transport_api_cmd_backchannel_check.c
@@ -30,7 +30,6 @@
30#include "gnunet_testing_netjail_lib.h" 30#include "gnunet_testing_netjail_lib.h"
31#include "gnunet_transport_application_service.h" 31#include "gnunet_transport_application_service.h"
32#include "gnunet_hello_lib.h" 32#include "gnunet_hello_lib.h"
33#include "gnunet_transport_service.h"
34#include "transport-testing-cmds.h" 33#include "transport-testing-cmds.h"
35 34
36/** 35/**
diff --git a/src/transport/transport_api_cmd_connecting_peers.c b/src/transport/transport_api_cmd_connecting_peers.c
index 33991bc29..c59c4b006 100644
--- a/src/transport/transport_api_cmd_connecting_peers.c
+++ b/src/transport/transport_api_cmd_connecting_peers.c
@@ -29,7 +29,6 @@
29#include "gnunet_testing_netjail_lib.h" 29#include "gnunet_testing_netjail_lib.h"
30#include "gnunet_transport_application_service.h" 30#include "gnunet_transport_application_service.h"
31#include "gnunet_hello_lib.h" 31#include "gnunet_hello_lib.h"
32#include "gnunet_transport_service.h"
33#include "transport-testing-cmds.h" 32#include "transport-testing-cmds.h"
34 33
35/** 34/**
diff --git a/src/util/bio.c b/src/util/bio.c
index 3a463bcd1..caf533108 100644
--- a/src/util/bio.c
+++ b/src/util/bio.c
@@ -23,7 +23,6 @@
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25 25
26#include "gnunet_common.h"
27#include "platform.h" 26#include "platform.h"
28#include "gnunet_util_lib.h" 27#include "gnunet_util_lib.h"
29 28
diff --git a/src/util/configuration.c b/src/util/configuration.c
index 45aec7981..17ba253ff 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -23,7 +23,6 @@
23 * @author Christian Grothoff 23 * @author Christian Grothoff
24 */ 24 */
25 25
26#include "gnunet_common.h"
27#include "platform.h" 26#include "platform.h"
28#include "gnunet_util_lib.h" 27#include "gnunet_util_lib.h"
29#include "gnunet_configuration_lib.h" 28#include "gnunet_configuration_lib.h"
diff --git a/src/util/container_heap.c b/src/util/container_heap.c
index 56a002f8c..232e66bf9 100644
--- a/src/util/container_heap.c
+++ b/src/util/container_heap.c
@@ -26,7 +26,6 @@
26 */ 26 */
27 27
28 28
29#include "gnunet_common.h"
30#include "platform.h" 29#include "platform.h"
31#include "gnunet_util_lib.h" 30#include "gnunet_util_lib.h"
32 31
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c
index 65d7f33c0..73333d22a 100644
--- a/src/util/container_multihashmap.c
+++ b/src/util/container_multihashmap.c
@@ -24,7 +24,6 @@
24 */ 24 */
25 25
26 26
27#include "gnunet_common.h"
28#include "platform.h" 27#include "platform.h"
29#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
30 29
diff --git a/src/util/container_multishortmap.c b/src/util/container_multishortmap.c
index 327616048..c626b55e5 100644
--- a/src/util/container_multishortmap.c
+++ b/src/util/container_multishortmap.c
@@ -24,7 +24,6 @@
24 */ 24 */
25 25
26 26
27#include "gnunet_common.h"
28#include "platform.h" 27#include "platform.h"
29#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
30 29
diff --git a/src/util/container_multiuuidmap.c b/src/util/container_multiuuidmap.c
index 53975b3f7..3e957d47b 100644
--- a/src/util/container_multiuuidmap.c
+++ b/src/util/container_multiuuidmap.c
@@ -24,7 +24,6 @@
24 */ 24 */
25 25
26 26
27#include "gnunet_common.h"
28#include "platform.h" 27#include "platform.h"
29#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
30 29