summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/Makefile.am1
-rwxr-xr-xcontrib/taler-exchange-revoke24
-rw-r--r--src/auditor/taler-helper-auditor-aggregation.c27
-rw-r--r--src/benchmark/taler-exchange-benchmark.c8
-rw-r--r--src/exchange-tools/taler-exchange-dbinit.c25
-rw-r--r--src/exchange-tools/taler-exchange-offline.c21
-rw-r--r--src/exchange/taler-exchange-aggregator.c24
-rw-r--r--src/exchange/taler-exchange-closer.c23
-rw-r--r--src/exchange/taler-exchange-transfer.c23
-rw-r--r--src/exchange/taler-exchange-wirewatch.c23
10 files changed, 100 insertions, 99 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 0f10d8ec..896880ff 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -27,7 +27,6 @@ rdata_DATA = \
bin_SCRIPTS = \
taler-bank-manage-testing \
- taler-exchange-revoke \
taler-nexus-prepare
EXTRA_DIST = \
diff --git a/contrib/taler-exchange-revoke b/contrib/taler-exchange-revoke
deleted file mode 100755
index 8e4bc6ed..00000000
--- a/contrib/taler-exchange-revoke
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# This file is in the public domain
-#
-# Used to first revoke a key and then restart the exchange
-# to ensure it notices the revocation.
-#
-# Takes 2 arguments:
-# $1: the configuration file name
-# $2: the denomination key hash (DKH) of the denomination to revoke
-
-set -eu
-
-if [ "$#" -ne 2 ];
-then
- echo "illegal number of parameters"
- exit 1
-fi
-
-taler-exchange-keyup -c $1 -r $2
-
-EXCHANGE_PID=`ps x | grep taler-exchange-httpd | awk '{print $1}'`
-kill -SIGUSR1 $EXCHANGE_PID
-
-exit 0
diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c
index 5a144ddf..830773c7 100644
--- a/src/auditor/taler-helper-auditor-aggregation.c
+++ b/src/auditor/taler-helper-auditor-aggregation.c
@@ -1480,24 +1480,33 @@ main (int argc,
"timetravel"),
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_STRINGS_get_utf8_args (argc, argv,
+ &argc, &argv))
+ return 4;
GNUNET_assert (GNUNET_OK ==
GNUNET_log_setup ("taler-helper-auditor-aggregation",
"MESSAGE",
NULL));
- if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc,
- argv,
- "taler-helper-auditor-aggregation",
- "Audit Taler exchange aggregation activity",
- options,
- &run,
- NULL))
- return 1;
+ ret = GNUNET_PROGRAM_run (
+ argc,
+ argv,
+ "taler-helper-auditor-aggregation",
+ gettext_noop ("Audit Taler exchange aggregation activity"),
+ 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/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c
index 08c701fd..95789b81 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -118,7 +118,7 @@ static char *cfg_filename;
/**
* Exit code.
*/
-static int result;
+static enum GNUNET_GenericReturnValue result;
/**
* Use the fakebank instead of the Python bank.
@@ -459,7 +459,7 @@ run (void *cls,
GNUNET_free (amount_4);
GNUNET_free (amount_5);
GNUNET_free (withdraw_fee_str);
- result = 1;
+ result = GNUNET_OK;
}
@@ -546,7 +546,7 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
void *main_cb_cls,
const char *config_file)
{
- int result = GNUNET_OK;
+ enum GNUNET_GenericReturnValue result = GNUNET_OK;
pid_t cpids[howmany_clients];
pid_t fakebank = -1;
int wstatus;
@@ -989,6 +989,8 @@ main (int argc,
argv)))
{
GNUNET_free (cfg_filename);
+ if (GNUNET_NO == result)
+ return 0;
return BAD_CLI_ARG;
}
GNUNET_log_setup ("taler-exchange-benchmark",
diff --git a/src/exchange-tools/taler-exchange-dbinit.c b/src/exchange-tools/taler-exchange-dbinit.c
index 67632fac..b1d2100d 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 33aa50f4..83d9e63c 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;
}
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index af9b1551..a8448edb 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -1023,26 +1023,26 @@ main (int argc,
"test",
"run in test mode and exit when idle",
&test_mode),
- GNUNET_GETOPT_option_version (VERSION "-" VCS_VERSION),
GNUNET_GETOPT_OPTION_END
};
+ enum GNUNET_GenericReturnValue ret;
if (GNUNET_OK !=
GNUNET_STRINGS_get_utf8_args (argc, argv,
&argc, &argv))
return GR_CMD_LINE_UTF8_ERROR;
- if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc, argv,
- "taler-exchange-aggregator",
- gettext_noop (
- "background process that aggregates and executes wire transfers"),
- options,
- &run, NULL))
- {
- GNUNET_free_nz ((void *) argv);
- return GR_CMD_LINE_OPTIONS_WRONG;
- }
+ ret = GNUNET_PROGRAM_run (
+ argc, argv,
+ "taler-exchange-aggregator",
+ gettext_noop (
+ "background process that aggregates and executes wire transfers"),
+ options,
+ &run, NULL);
GNUNET_free_nz ((void *) argv);
+ if (GNUNET_SYSERR == ret)
+ return GR_CMD_LINE_OPTIONS_WRONG;
+ if (GNUNET_NO == ret)
+ return 0;
return global_ret;
}
diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c
index ffd2315e..c32e933b 100644
--- a/src/exchange/taler-exchange-closer.c
+++ b/src/exchange/taler-exchange-closer.c
@@ -553,26 +553,25 @@ main (int argc,
"test",
"run in test mode and exit when idle",
&test_mode),
- GNUNET_GETOPT_option_version (VERSION "-" VCS_VERSION),
GNUNET_GETOPT_OPTION_END
};
+ enum GNUNET_GenericReturnValue ret;
if (GNUNET_OK !=
GNUNET_STRINGS_get_utf8_args (argc, argv,
&argc, &argv))
return GR_CMD_LINE_UTF8_ERROR;
- if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc, argv,
- "taler-exchange-closer",
- gettext_noop (
- "background process that closes expired reserves"),
- options,
- &run, NULL))
- {
- GNUNET_free_nz ((void *) argv);
- return GR_CMD_LINE_OPTIONS_WRONG;
- }
+ ret = GNUNET_PROGRAM_run (
+ argc, argv,
+ "taler-exchange-closer",
+ gettext_noop ("background process that closes expired reserves"),
+ options,
+ &run, NULL);
GNUNET_free_nz ((void *) argv);
+ if (GNUNET_SYSERR == ret)
+ return GR_CMD_LINE_OPTIONS_WRONG;
+ if (GNUNET_NO == ret)
+ return 0;
return global_ret;
}
diff --git a/src/exchange/taler-exchange-transfer.c b/src/exchange/taler-exchange-transfer.c
index 9c350220..370aed6c 100644
--- a/src/exchange/taler-exchange-transfer.c
+++ b/src/exchange/taler-exchange-transfer.c
@@ -565,23 +565,24 @@ main (int argc,
GNUNET_GETOPT_option_version (VERSION "-" VCS_VERSION),
GNUNET_GETOPT_OPTION_END
};
+ enum GNUNET_GenericReturnValue ret;
if (GNUNET_OK !=
GNUNET_STRINGS_get_utf8_args (argc, argv,
&argc, &argv))
return GR_CMD_LINE_UTF8_ERROR;
- if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc, argv,
- "taler-exchange-transfer",
- gettext_noop (
- "background process that executes outgoing wire transfers"),
- options,
- &run, NULL))
- {
- GNUNET_free_nz ((void *) argv);
- return GR_CMD_LINE_OPTIONS_WRONG;
- }
+ ret = GNUNET_PROGRAM_run (
+ argc, argv,
+ "taler-exchange-transfer",
+ gettext_noop (
+ "background process that executes outgoing wire transfers"),
+ options,
+ &run, NULL);
GNUNET_free_nz ((void *) argv);
+ if (GNUNET_SYSERR == ret)
+ return GR_CMD_LINE_OPTIONS_WRONG;
+ if (GNUNET_NO == ret)
+ return 0;
return global_ret;
}
diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c
index 47f2bdb6..1b5c5d41 100644
--- a/src/exchange/taler-exchange-wirewatch.c
+++ b/src/exchange/taler-exchange-wirewatch.c
@@ -625,23 +625,24 @@ main (int argc,
&reset_mode),
GNUNET_GETOPT_OPTION_END
};
+ enum GNUNET_GenericReturnValue ret;
if (GNUNET_OK !=
GNUNET_STRINGS_get_utf8_args (argc, argv,
&argc, &argv))
return GR_CMD_LINE_UTF8_ERROR;
- if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc, argv,
- "taler-exchange-wirewatch",
- gettext_noop (
- "background process that watches for incoming wire transfers from customers"),
- options,
- &run, NULL))
- {
- GNUNET_free_nz ((void *) argv);
- return GR_CMD_LINE_OPTIONS_WRONG;
- }
+ ret = GNUNET_PROGRAM_run (
+ argc, argv,
+ "taler-exchange-wirewatch",
+ gettext_noop (
+ "background process that watches for incoming wire transfers from customers"),
+ options,
+ &run, NULL);
GNUNET_free_nz ((void *) argv);
+ if (GNUNET_SYSERR == ret)
+ return GR_CMD_LINE_OPTIONS_WRONG;
+ if (GNUNET_NO == ret)
+ return 0;
return global_ret;
}