add -I command line option

This commit is contained in:
Christian Grothoff 2021-12-02 13:31:20 +01:00
parent 5a7dd00125
commit bbdc7649f7
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 14 additions and 0 deletions

View File

@ -127,6 +127,11 @@ static unsigned int connection_timeout = 30;
*/
static int connection_close;
/**
* -I command-line flag given?
*/
int TEH_check_invariants;
/**
* True if we should commit suicide once all active
* connections are finished.
@ -1903,6 +1908,10 @@ main (int argc,
"connection-close",
"force HTTP connections to be closed after each request",
&connection_close),
GNUNET_GETOPT_option_flag ('I',
"check-invariants",
"enable expensive invariant checks",
&TEH_check_invariants),
GNUNET_GETOPT_option_flag ('r',
"allow-reuse-address",
"allow multiple HTTPDs to listen to the same port",

View File

@ -144,6 +144,11 @@ extern const struct GNUNET_CONFIGURATION_Handle *TEH_cfg;
*/
extern char *TEH_exchange_directory;
/**
* -I command-line flag given?
*/
extern int TEH_check_invariants;
/**
* Are clients allowed to request /keys for times other than the
* current time? Allowing this could be abused in a DoS-attack