diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-01-07 10:40:01 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-01-07 10:40:01 +0100 |
commit | b2d8799af1b09b67779df3fd71b84ec59f7e9f7e (patch) | |
tree | b0db537f87cc4d94374877966e87bc09d6a0d571 /src/exchange-tools | |
parent | 40551fa08e45fcc71f3d260478a2f9910920f27d (diff) |
work on #6679"
Diffstat (limited to 'src/exchange-tools')
-rw-r--r-- | src/exchange-tools/taler-exchange-dbinit.c | 25 | ||||
-rw-r--r-- | src/exchange-tools/taler-exchange-offline.c | 21 |
2 files changed, 30 insertions, 16 deletions
diff --git a/src/exchange-tools/taler-exchange-dbinit.c b/src/exchange-tools/taler-exchange-dbinit.c index 67632faca..b1d2100df 100644 --- a/src/exchange-tools/taler-exchange-dbinit.c +++ b/src/exchange-tools/taler-exchange-dbinit.c @@ -117,22 +117,27 @@ main (int argc, &gc_db), 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-exchange-dbinit", - "INFO", - NULL)); if (GNUNET_OK != - GNUNET_PROGRAM_run (argc, argv, - "taler-exchange-dbinit", - "Initialize Taler exchange database", - options, - &run, NULL)) - return 1; + GNUNET_STRINGS_get_utf8_args (argc, argv, + &argc, &argv)) + return 4; + ret = GNUNET_PROGRAM_run ( + argc, argv, + "taler-exchange-dbinit", + gettext_noop ("Initialize Taler exchange database"), + 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/exchange-tools/taler-exchange-offline.c b/src/exchange-tools/taler-exchange-offline.c index 33aa50f4f..83d9e63ca 100644 --- a/src/exchange-tools/taler-exchange-offline.c +++ b/src/exchange-tools/taler-exchange-offline.c @@ -3346,18 +3346,27 @@ main (int argc, struct GNUNET_GETOPT_CommandLineOption options[] = { 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 (); if (GNUNET_OK != - GNUNET_PROGRAM_run (argc, argv, - "taler-exchange-offline", - "Operations for offline signing for a Taler exchange", - options, - &run, NULL)) - return 1; + GNUNET_STRINGS_get_utf8_args (argc, argv, + &argc, &argv)) + return 4; + ret = GNUNET_PROGRAM_run ( + argc, argv, + "taler-exchange-offline", + gettext_noop ("Operations for offline signing for a Taler exchange"), + options, + &run, NULL); + GNUNET_free_nz ((void *) argv); + if (GNUNET_SYSERR == ret) + return 3; + if (GNUNET_NO == ret) + return 0; return global_ret; } |