From 388295b283310b9a679861bee92952b247f574fe Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 26 Jul 2009 21:25:54 +0000 Subject: [PATCH] fixes --- src/core/test_core_api.c | 2 +- src/core/test_core_api_start_only.c | 2 +- src/include/gnunet_testing_lib.h | 24 +++++++++--------------- src/transport/plugin_transport_tcp.c | 2 +- src/transport/test_transport_api.c | 2 +- 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 89aa9b13e..935c004cc 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c @@ -48,7 +48,7 @@ struct PeerContext { - const struct GNUNET_CONFIGURATION_Handle *cfg; + struct GNUNET_CONFIGURATION_Handle *cfg; struct GNUNET_CORE_Handle *ch; struct GNUNET_PeerIdentity id; struct GNUNET_TRANSPORT_Handle *th; diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index f1993325c..62550f0ec 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c @@ -45,7 +45,7 @@ struct PeerContext { - const struct GNUNET_CONFIGURATION_Handle *cfg; + struct GNUNET_CONFIGURATION_Handle *cfg; struct GNUNET_CORE_Handle *ch; struct GNUNET_PeerIdentity id; #if START_ARM diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index 3a18a17c3..560a25355 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h @@ -58,6 +58,7 @@ struct GNUNET_TESTING_Daemon; * * @param cls closure * @param id identifier for the daemon, NULL on error + * @param cfg configuration used by this daemon * @param d handle for the daemon * @param emsg error message (NULL on success) */ @@ -127,7 +128,7 @@ void GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d, * @param cb_cls closure for cb */ void GNUNET_TESTING_daemon_reconfigure (struct GNUNET_TESTING_Daemon *d, - struct GNUNET_CONFIGURATION_Handle *cfg, + const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_TESTING_NotifyCompletion cb, void * cb_cls); @@ -150,20 +151,15 @@ void GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, void *cb_cls); - /** - * Start count gnunetd processes with the same set of - * transports and applications. The port numbers will - * be computed by adding delta each time (zero - * times for the first peer). + * Start count gnunetd processes with the same set of transports and + * applications. The port numbers (any option called "PORT") will be + * adjusted to ensure that no two peers running on the same system + * have the same port(s) in their respective configurations. * * @param sched scheduler to use - * @param cfg configuration to use + * @param cfg configuration template to use * @param total number of daemons to start - * @param service_home_prefix path to use as the prefix for the home of the services; - * a number will be added for the different peers - * @param transports which transports should all peers use - * @param applications which applications should be used? * @param cb function to call on each daemon that was started * @param cb_cls closure for cb * @param cbe function to call at the end @@ -176,11 +172,8 @@ void GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, */ void GNUNET_TESTING_daemons_start_va (struct GNUNET_SCHEDULER_Handle *sched, - struct GNUNET_CONFIGURATION_Handle *cfg, + const struct GNUNET_CONFIGURATION_Handle *cfg, unsigned int total, - const char *service_home_prefix, - const char *transports, - const char *applications, GNUNET_TESTING_NotifyDaemonRunning cb, void *cb_cls, GNUNET_TESTING_NotifyCompletion cbe, @@ -188,6 +181,7 @@ GNUNET_TESTING_daemons_start_va (struct GNUNET_SCHEDULER_Handle *sched, const char *hostname, va_list va); + /** * Start count gnunetd processes with the same set of * transports and applications. The port numbers will diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 76d980621..7585e26e8 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -39,7 +39,7 @@ #include "plugin_transport.h" #include "transport.h" -#define DEBUG_TCP GNUNET_YES +#define DEBUG_TCP GNUNET_NO /** * After how long do we expire an address that we diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index f96710c38..ae4ba3c76 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c @@ -44,7 +44,7 @@ struct PeerContext { - const struct GNUNET_CONFIGURATION_Handle *cfg; + struct GNUNET_CONFIGURATION_Handle *cfg; struct GNUNET_TRANSPORT_Handle *th; struct GNUNET_PeerIdentity id; #if START_ARM -- 2.25.1