merchant

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

commit 17ac7add26c7af81c3f50fce71d086de33f2e754
parent 9bf941792d5d093a51d811f5e2595ca5b718cdb0
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Tue,  5 Mar 2019 14:43:26 +0100

Fix argument parsing.

Diffstat:
Msrc/merchant-tools/README | 9++-------
Msrc/merchant-tools/taler-merchant-benchmark.c | 27+++++++++++++++++++--------
2 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/src/merchant-tools/README b/src/merchant-tools/README @@ -1,4 +1,3 @@ - ** Taler Merchant Payments Generator ** === INTRODUCTION === @@ -10,7 +9,7 @@ payments to be in place. It is mandatory to give it a config file that contains information about the setup to target. Note that the merchant and the exchange -tun by this command will use their own config files, so just few values +run by this command will use their own config files, so just few values are required for it to run. @@ -43,9 +42,5 @@ currency = EUR taler-merchant-generate-payments -c config/file.conf [-n ITERATIONS] -The -n option instructs the tools about how many iteration of all +The -n option instructs the tool about how many iterations of all the (internal) commands we want to execute. - -** Taler Merchant Dbinit ** - -TBD diff --git a/src/merchant-tools/taler-merchant-benchmark.c b/src/merchant-tools/taler-merchant-benchmark.c @@ -702,15 +702,19 @@ main (int argc, }; options = root_options; - if (0 == strcmp ("ordinary", argv[1])) - { - ordinary = GNUNET_YES; - options = ordinary_options; - } - if (0 == strcmp ("corner", argv[1])) + + if (NULL != argv[1]) { - corner = GNUNET_YES; - options = corner_options; + if (0 == strcmp ("ordinary", argv[1])) + { + ordinary = GNUNET_YES; + options = ordinary_options; + } + if (0 == strcmp ("corner", argv[1])) + { + corner = GNUNET_YES; + options = corner_options; + } } if (GNUNET_SYSERR != (result = GNUNET_GETOPT_run @@ -736,6 +740,13 @@ main (int argc, return 1; } + if ((GNUNET_YES != ordinary) || (GNUNET_YES != corner)) + { + fprintf (stderr, + "Please use 'ordinary' or 'corner' subcommands.\n"); + return 1; + } + if ((GNUNET_YES == corner) && (NULL == alt_instance)) { fprintf (stderr, "option '-i' is mandatory"