merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 579938a29e1d1d4ada49ca4c1a8b0d18878974a9
parent 509617fdc804b107df27770a3a6a505abc786520
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri,  6 Nov 2020 10:11:08 +0100

fix return value from main() when run with -h/-v

Diffstat:
Msrc/backend/taler-merchant-httpd.c | 15++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c @@ -1819,6 +1819,7 @@ int main (int argc, char *const *argv) { + enum GNUNET_GenericReturnValue res; struct GNUNET_GETOPT_CommandLineOption options[] = { GNUNET_GETOPT_option_flag ('C', "connection-close", @@ -1828,11 +1829,15 @@ main (int argc, "timetravel"), GNUNET_GETOPT_OPTION_END }; - if (GNUNET_OK != - GNUNET_PROGRAM_run (argc, argv, - "taler-merchant-httpd", - "Taler merchant's HTTP backend interface", - options, &run, NULL)) + + res = GNUNET_PROGRAM_run (argc, argv, + "taler-merchant-httpd", + "Taler merchant's HTTP backend interface", + options, + &run, NULL); + if (GNUNET_SYSERR == res) return 3; + if (GNUNET_NO == res) + return 0; return (GNUNET_OK == result) ? 0 : 1; }