-fix compiler warning: add missing prototype

This commit is contained in:
Christian Grothoff 2023-01-15 22:58:07 +01:00
parent 50a33389da
commit cbb021b6bf
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 37 additions and 16 deletions

@ -1 +1 @@
Subproject commit 4dd732710277a1761972e08707578b01ecf2d678 Subproject commit 832685b6a942a6ebbec8e1e5b8c33b6b85b0a727

View File

@ -868,6 +868,24 @@ struct GNUNET_OS_Process *
TALER_TESTING_run_bank (const char *config_filename, TALER_TESTING_run_bank (const char *config_filename,
const char *bank_url); const char *bank_url);
/**
* Prepare libeufin sandbox execution. Check if the port is available and
* reset database.
*
* @param config_filename configuration file name.
* @param reset_db should we reset the bank's database
* @param config_section which configuration section should be used
* @param[out] bc set to the bank's configuration data
* @return #GNUNET_OK on success
*/
enum GNUNET_GenericReturnValue
TALER_TESTING_prepare_libeufin (const char *config_filename,
bool reset_db,
const char *config_section,
struct TALER_TESTING_BankConfiguration *bc);
/** /**
* Start the (nexus) bank process. Assume the port * Start the (nexus) bank process. Assume the port
* is available and the database is clean. Use the "prepare * is available and the database is clean. Use the "prepare
@ -909,7 +927,7 @@ TALER_TESTING_run_fakebank (const char *bank_url,
*/ */
enum GNUNET_GenericReturnValue enum GNUNET_GenericReturnValue
TALER_TESTING_prepare_bank (const char *config_filename, TALER_TESTING_prepare_bank (const char *config_filename,
int reset_db, bool reset_db,
const char *config_section, const char *config_section,
struct TALER_TESTING_BankConfiguration *bc); struct TALER_TESTING_BankConfiguration *bc);

View File

@ -1,6 +1,6 @@
/* /*
This file is part of TALER This file is part of TALER
Copyright (C) 2018-2021 Taler Systems SA Copyright (C) 2018-2023 Taler Systems SA
TALER is free software; you can redistribute it and/or modify TALER is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as it under the terms of the GNU General Public License as
@ -299,7 +299,7 @@ TALER_TESTING_run_bank (const char *config_filename,
enum GNUNET_GenericReturnValue enum GNUNET_GenericReturnValue
TALER_TESTING_prepare_libeufin (const char *config_filename, TALER_TESTING_prepare_libeufin (const char *config_filename,
int reset_db, bool reset_db,
const char *config_section, const char *config_section,
struct TALER_TESTING_BankConfiguration *bc) struct TALER_TESTING_BankConfiguration *bc)
{ {
@ -354,9 +354,9 @@ TALER_TESTING_prepare_libeufin (const char *config_filename,
GNUNET_NETWORK_test_port_free (IPPROTO_TCP, GNUNET_NETWORK_test_port_free (IPPROTO_TCP,
(uint16_t) port)) (uint16_t) port))
{ {
fprintf (stderr, GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Required port %llu not available, skipping.\n", "Required port %llu not available, skipping.\n",
port); port);
GNUNET_break (0); GNUNET_break (0);
GNUNET_free (database); GNUNET_free (database);
GNUNET_CONFIGURATION_destroy (cfg); GNUNET_CONFIGURATION_destroy (cfg);
@ -364,7 +364,7 @@ TALER_TESTING_prepare_libeufin (const char *config_filename,
} }
/* DB preparation */ /* DB preparation */
if (GNUNET_YES == reset_db) if (reset_db)
{ {
if (0 != system ("rm -f /tmp/libeufin-exchange-test-nexusdb.sqlite3")) if (0 != system ("rm -f /tmp/libeufin-exchange-test-nexusdb.sqlite3"))
{ {
@ -414,11 +414,14 @@ TALER_TESTING_prepare_libeufin (const char *config_filename,
"Relying on nexus %s on port %u\n", "Relying on nexus %s on port %u\n",
bc->exchange_auth.wire_gateway_url, bc->exchange_auth.wire_gateway_url,
(unsigned int) port); (unsigned int) port);
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "exchange payto: %s\n", GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"exchange payto: %s\n",
bc->exchange_payto); bc->exchange_payto);
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "user42_payto: %s\n", GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"user42_payto: %s\n",
bc->user42_payto); bc->user42_payto);
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "user42_payto: %s\n", GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"user42_payto: %s\n",
bc->user43_payto); bc->user43_payto);
return GNUNET_OK; return GNUNET_OK;
} }
@ -426,7 +429,7 @@ TALER_TESTING_prepare_libeufin (const char *config_filename,
enum GNUNET_GenericReturnValue enum GNUNET_GenericReturnValue
TALER_TESTING_prepare_bank (const char *config_filename, TALER_TESTING_prepare_bank (const char *config_filename,
int reset_db, bool reset_db,
const char *config_section, const char *config_section,
struct TALER_TESTING_BankConfiguration *bc) struct TALER_TESTING_BankConfiguration *bc)
{ {
@ -498,9 +501,9 @@ TALER_TESTING_prepare_bank (const char *config_filename,
GNUNET_NETWORK_test_port_free (IPPROTO_TCP, GNUNET_NETWORK_test_port_free (IPPROTO_TCP,
(uint16_t) port)) (uint16_t) port))
{ {
fprintf (stderr, GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Required port %llu not available, skipping.\n", "Required port %llu not available, skipping.\n",
port); port);
GNUNET_break (0); GNUNET_break (0);
GNUNET_free (database); GNUNET_free (database);
GNUNET_CONFIGURATION_destroy (cfg); GNUNET_CONFIGURATION_destroy (cfg);
@ -508,7 +511,7 @@ TALER_TESTING_prepare_bank (const char *config_filename,
} }
/* DB preparation */ /* DB preparation */
if (GNUNET_YES == reset_db) if (reset_db)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_INFO, GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Flushing bank database\n"); "Flushing bank database\n");