summaryrefslogtreecommitdiff
path: root/src/merchant-tools/taler-merchant-benchmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/merchant-tools/taler-merchant-benchmark.c')
-rw-r--r--src/merchant-tools/taler-merchant-benchmark.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/merchant-tools/taler-merchant-benchmark.c b/src/merchant-tools/taler-merchant-benchmark.c
index 4d6297a6..bb6591f2 100644
--- 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"