add -r option to exchange-httpd

This commit is contained in:
Christian Grothoff 2021-11-24 21:57:39 +01:00
parent 5116186ec1
commit 4ceef77ae5
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 12 additions and 0 deletions

View File

@ -66,6 +66,11 @@
*/ */
int TEH_allow_keys_timetravel; int TEH_allow_keys_timetravel;
/**
* Should we allow two HTTPDs to bind to the same port?
*/
static int allow_address_reuse;
/** /**
* The exchange's configuration (global) * The exchange's configuration (global)
*/ */
@ -1797,6 +1802,8 @@ run (void *cls,
MHD_OPTION_NOTIFY_CONNECTION, MHD_OPTION_NOTIFY_CONNECTION,
&connection_done, &connection_done,
NULL, NULL,
MHD_OPTION_LISTENING_ADDRESS_REUSE,
(unsigned int) allow_address_reuse,
MHD_OPTION_CONNECTION_TIMEOUT, MHD_OPTION_CONNECTION_TIMEOUT,
connection_timeout, connection_timeout,
MHD_OPTION_END); MHD_OPTION_END);
@ -1839,6 +1846,10 @@ main (int argc,
"connection-close", "connection-close",
"force HTTP connections to be closed after each request", "force HTTP connections to be closed after each request",
&connection_close), &connection_close),
GNUNET_GETOPT_option_flag ('r',
"allow-reuse-address",
"allow multiple HTTPDs to listen to the same port",
&allow_address_reuse),
GNUNET_GETOPT_option_uint ('t', GNUNET_GETOPT_option_uint ('t',
"timeout", "timeout",
"SECONDS", "SECONDS",

View File

@ -766,6 +766,7 @@ TALER_TESTING_setup_with_exchange_cfg (
"-a", /* some tests may need timetravel */ "-a", /* some tests may need timetravel */
"-c", setup_ctx->config_filename, "-c", setup_ctx->config_filename,
#if GNU_PARALLEL #if GNU_PARALLEL
"-r",
":::", ":::",
"-", "-",
"-", "-",