diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-01-07 20:52:22 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-01-07 20:52:22 +0100 |
commit | b8c889d9b3f0c8cd9db7254802e34468f2aa5b2e (patch) | |
tree | 3cc13f09348cebb937d1a4610c439787f2b1ccd3 | |
parent | d13783b850ae7c32ee6f74538a479ecd0f3d4acc (diff) | |
download | merchant-b8c889d9b3f0c8cd9db7254802e34468f2aa5b2e.tar.gz merchant-b8c889d9b3f0c8cd9db7254802e34468f2aa5b2e.tar.bz2 merchant-b8c889d9b3f0c8cd9db7254802e34468f2aa5b2e.zip |
fix remaining #6679 issues in exchange
-rw-r--r-- | src/merchant-tools/taler-merchant-dbinit.c | 28 | ||||
-rw-r--r-- | src/merchant-tools/taler-merchant-setup-reserve.c | 23 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_merchant_get_order.c | 4 |
3 files changed, 33 insertions, 22 deletions
diff --git a/src/merchant-tools/taler-merchant-dbinit.c b/src/merchant-tools/taler-merchant-dbinit.c index 9c0f855d..c3a77d52 100644 --- a/src/merchant-tools/taler-merchant-dbinit.c +++ b/src/merchant-tools/taler-merchant-dbinit.c @@ -96,7 +96,6 @@ main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_option_flag ('r', "reset", "reset database (DANGEROUS: all existing data is lost!)", @@ -104,24 +103,29 @@ main (int argc, GNUNET_GETOPT_OPTION_END }; + enum GNUNET_GenericReturnValue ret; /* force linker to link against libtalerutil; if we do not do this, the linker may "optimize" libtalerutil away and skip #TALER_OS_init(), which we do need */ (void) TALER_project_data_default (); - GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-merchant-dbinit", - "INFO", - NULL)); if (GNUNET_OK != - GNUNET_PROGRAM_run (argc, argv, - "taler-merchant-dbinit", - "Initialize Taler merchant database", - options, - &run, NULL)) - return 1; + GNUNET_STRINGS_get_utf8_args (argc, argv, + &argc, &argv)) + return 4; + ret = GNUNET_PROGRAM_run ( + argc, argv, + "taler-merchant-dbinit", + gettext_noop ("Initialize Taler merchant database"), + options, + &run, NULL); + GNUNET_free_nz ((void *) argv); + if (GNUNET_SYSERR == ret) + return 3; + if (GNUNET_NO == ret) + return 0; return global_ret; } -/* end of taler-exchange-dbinit.c */ +/* end of taler-merchant-dbinit.c */ diff --git a/src/merchant-tools/taler-merchant-setup-reserve.c b/src/merchant-tools/taler-merchant-setup-reserve.c index c5617233..85afea2c 100644 --- a/src/merchant-tools/taler-merchant-setup-reserve.c +++ b/src/merchant-tools/taler-merchant-setup-reserve.c @@ -304,22 +304,27 @@ main (int argc, &wire_method)), GNUNET_GETOPT_OPTION_END }; + enum GNUNET_GenericReturnValue ret; /* force linker to link against libtalerutil; if we do not do this, the linker may "optimize" libtalerutil away and skip #TALER_OS_init(), which we do need */ (void) TALER_project_data_default (); - GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-merchant-setup-reserve", - "INFO", - NULL)); if (GNUNET_OK != - GNUNET_PROGRAM_run (argc, argv, - "taler-merchant-setup-reserve", - "Setup reserve for tipping", - options, - &run, NULL)) + GNUNET_STRINGS_get_utf8_args (argc, argv, + &argc, &argv)) + return 4; + ret = GNUNET_PROGRAM_run ( + argc, argv, + "taler-merchant-setup-reserve", + gettext_noop ("Setup reserve for tipping"), + options, + &run, NULL); + GNUNET_free_nz ((void *) argv); + if (GNUNET_SYSERR == ret) return 3; + if (GNUNET_NO == ret) + return 0; return global_ret; } diff --git a/src/testing/testing_api_cmd_merchant_get_order.c b/src/testing/testing_api_cmd_merchant_get_order.c index 3a6c525f..2c6a3db5 100644 --- a/src/testing/testing_api_cmd_merchant_get_order.c +++ b/src/testing/testing_api_cmd_merchant_get_order.c @@ -494,7 +494,9 @@ merchant_get_order_cb ( (NULL != pud.ssid)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Order pay uri does not match\n"); + "Order pay uri does not match, got %s/%s\n", + pud.merchant_host, + pud.order_id); TALER_TESTING_interpreter_fail (gos->is); TALER_MERCHANT_parse_pay_uri_free (&pud); return; |