aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/auditor/taler-auditor-dbinit.c25
-rw-r--r--src/auditor/taler-auditor-exchange.c15
-rw-r--r--src/auditor/taler-auditor-httpd.c15
-rw-r--r--src/auditor/taler-helper-auditor-aggregation.c4
-rw-r--r--src/auditor/taler-helper-auditor-coins.c29
-rw-r--r--src/auditor/taler-helper-auditor-deposits.c30
-rw-r--r--src/auditor/taler-helper-auditor-reserves.c29
-rw-r--r--src/auditor/taler-helper-auditor-wire.c30
-rw-r--r--src/bank-lib/taler-wire-gateway-client.c42
-rw-r--r--src/exchange-tools/taler-auditor-offline.c25
10 files changed, 147 insertions, 97 deletions
diff --git a/src/auditor/taler-auditor-dbinit.c b/src/auditor/taler-auditor-dbinit.c
index 99ef96f8d..d0509fc08 100644
--- a/src/auditor/taler-auditor-dbinit.c
+++ b/src/auditor/taler-auditor-dbinit.c
@@ -134,22 +134,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-auditor-dbinit",
- "INFO",
- NULL));
if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc, argv,
- "taler-auditor-dbinit",
- "Initialize Taler auditor database",
- options,
- &run, NULL))
- return 1;
+ GNUNET_STRINGS_get_utf8_args (argc, argv,
+ &argc, &argv))
+ return 4;
+ ret = GNUNET_PROGRAM_run (
+ argc, argv,
+ "taler-auditor-dbinit",
+ gettext_noop ("Initialize Taler auditor 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/auditor/taler-auditor-exchange.c b/src/auditor/taler-auditor-exchange.c
index 2091031cb..238cc59a0 100644
--- a/src/auditor/taler-auditor-exchange.c
+++ b/src/auditor/taler-auditor-exchange.c
@@ -92,10 +92,17 @@ main (int argc,
GNUNET_log_setup ("taler-auditor-exchange",
"WARNING",
NULL));
- if (GNUNET_GETOPT_run ("taler-auditor-exchange",
- options,
- argc, argv) <= 0)
- return 1;
+ {
+ enum GNUNET_GenericReturnValue ret;
+
+ ret = GNUNET_GETOPT_run ("taler-auditor-exchange",
+ options,
+ argc, argv);
+ if (GNUNET_NO == ret)
+ return 0;
+ if (GNUNET_OK != ret)
+ return 1;
+ }
if (NULL == cfgfile)
cfgfile = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
cfg = GNUNET_CONFIGURATION_create ();
diff --git a/src/auditor/taler-auditor-httpd.c b/src/auditor/taler-auditor-httpd.c
index 1f6413b26..aac6d8a8c 100644
--- a/src/auditor/taler-auditor-httpd.c
+++ b/src/auditor/taler-auditor-httpd.c
@@ -569,11 +569,18 @@ main (int argc,
int fh = -1;
enum TALER_MHD_GlobalOptions go;
- if (0 >=
- GNUNET_GETOPT_run ("taler-auditor-httpd",
- options,
- argc, argv))
+ {
+ enum GNUNET_GenericReturnValue ret;
+
+ ret = GNUNET_GETOPT_run ("taler-auditor-httpd",
+ options,
+ argc, argv);
+ if (GNUNET_NO == ret)
+ return 0;
+ if (GNUNET_SYSERR == ret)
+ return 3;
return 1;
+ }
go = TALER_MHD_GO_NONE;
if (auditor_connection_close)
go |= TALER_MHD_GO_FORCE_CONNECTION_CLOSE;
diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c
index 830773c76..27c67ea5b 100644
--- a/src/auditor/taler-helper-auditor-aggregation.c
+++ b/src/auditor/taler-helper-auditor-aggregation.c
@@ -1490,10 +1490,6 @@ main (int argc,
GNUNET_STRINGS_get_utf8_args (argc, argv,
&argc, &argv))
return 4;
- GNUNET_assert (GNUNET_OK ==
- GNUNET_log_setup ("taler-helper-auditor-aggregation",
- "MESSAGE",
- NULL));
ret = GNUNET_PROGRAM_run (
argc,
argv,
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c
index bceb04198..7b91e77b4 100644
--- a/src/auditor/taler-helper-auditor-coins.c
+++ b/src/auditor/taler-helper-auditor-coins.c
@@ -2760,24 +2760,29 @@ 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 ();
- GNUNET_assert (GNUNET_OK ==
- GNUNET_log_setup ("taler-helper-auditor-coins",
- "MESSAGE",
- NULL));
if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc,
- argv,
- "taler-helper-auditor-coins",
- "Audit Taler coin processing",
- options,
- &run,
- NULL))
- return 1;
+ GNUNET_STRINGS_get_utf8_args (argc, argv,
+ &argc, &argv))
+ return 4;
+ ret = GNUNET_PROGRAM_run (
+ argc,
+ argv,
+ "taler-helper-auditor-coins",
+ gettext_noop ("Audit Taler coin processing"),
+ 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/auditor/taler-helper-auditor-deposits.c b/src/auditor/taler-helper-auditor-deposits.c
index 1c0128319..6bf94589a 100644
--- a/src/auditor/taler-helper-auditor-deposits.c
+++ b/src/auditor/taler-helper-auditor-deposits.c
@@ -360,24 +360,30 @@ 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 ();
- GNUNET_assert (GNUNET_OK ==
- GNUNET_log_setup ("taler-helper-auditor-deposits",
- "MESSAGE",
- NULL));
if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc,
- argv,
- "taler-helper-auditor-deposits",
- "Audit Taler exchange database for deposit confirmation consistency",
- options,
- &run,
- NULL))
- return 1;
+ GNUNET_STRINGS_get_utf8_args (argc, argv,
+ &argc, &argv))
+ return 4;
+ ret = GNUNET_PROGRAM_run (
+ argc,
+ argv,
+ "taler-helper-auditor-deposits",
+ gettext_noop (
+ "Audit Taler exchange database for deposit confirmation consistency"),
+ 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/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c
index 8b49f747c..8e53214ff 100644
--- a/src/auditor/taler-helper-auditor-reserves.c
+++ b/src/auditor/taler-helper-auditor-reserves.c
@@ -1677,24 +1677,29 @@ 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 ();
- GNUNET_assert (GNUNET_OK ==
- GNUNET_log_setup ("taler-helper-auditor-reserves",
- "MESSAGE",
- NULL));
if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc,
- argv,
- "taler-helper-auditor-reserves",
- "Audit Taler exchange reserve handling",
- options,
- &run,
- NULL))
- return 1;
+ GNUNET_STRINGS_get_utf8_args (argc, argv,
+ &argc, &argv))
+ return 4;
+ ret = GNUNET_PROGRAM_run (
+ argc,
+ argv,
+ "taler-helper-auditor-reserves",
+ gettext_noop ("Audit Taler exchange reserve handling"),
+ 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/auditor/taler-helper-auditor-wire.c b/src/auditor/taler-helper-auditor-wire.c
index 128eba812..fc91048a0 100644
--- a/src/auditor/taler-helper-auditor-wire.c
+++ b/src/auditor/taler-helper-auditor-wire.c
@@ -2183,24 +2183,30 @@ 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 ();
- GNUNET_assert (GNUNET_OK ==
- GNUNET_log_setup ("taler-helper-auditor-wire",
- "MESSAGE",
- NULL));
if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc,
- argv,
- "taler-helper-auditor-wire",
- "Audit exchange database for consistency with the bank's wire transfers",
- options,
- &run,
- NULL))
- return 1;
+ GNUNET_STRINGS_get_utf8_args (argc, argv,
+ &argc, &argv))
+ return 4;
+ ret = GNUNET_PROGRAM_run (
+ argc,
+ argv,
+ "taler-helper-auditor-wire",
+ gettext_noop (
+ "Audit exchange database for consistency with the bank's wire transfers"),
+ 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/bank-lib/taler-wire-gateway-client.c b/src/bank-lib/taler-wire-gateway-client.c
index 40dbd5bc7..c10b4ddde 100644
--- a/src/bank-lib/taler-wire-gateway-client.c
+++ b/src/bank-lib/taler-wire-gateway-client.c
@@ -227,7 +227,7 @@ credit_history_cb (void *cls,
* mentioned in the config section given by the user.
*/
static void
-execute_credit_history ()
+execute_credit_history (void)
{
if (NULL != subject)
{
@@ -329,7 +329,7 @@ debit_history_cb (void *cls,
* mentioned in the config section given by the user.
*/
static void
-execute_debit_history ()
+execute_debit_history (void)
{
if (NULL != subject)
{
@@ -396,7 +396,7 @@ confirmation_cb (void *cls,
* Ask the bank to execute a wire transfer.
*/
static void
-execute_wire_transfer ()
+execute_wire_transfer (void)
{
struct TALER_WireTransferIdentifierRawP wtid;
void *buf;
@@ -511,7 +511,7 @@ res_cb (void *cls,
* Ask the bank to execute a wire transfer to the exchange.
*/
static void
-execute_admin_transfer ()
+execute_admin_transfer (void)
{
struct TALER_ReservePublicKeyP reserve_pub;
@@ -674,7 +674,6 @@ main (int argc,
"URL",
"Wire gateway URL to use to talk to the bank",
&auth.wire_gateway_url),
- GNUNET_GETOPT_option_help ("Deposit funds into a Taler reserve"),
GNUNET_GETOPT_option_string ('C',
"credit",
"ACCOUNT",
@@ -720,21 +719,30 @@ main (int argc,
&start_row),
GNUNET_GETOPT_OPTION_END
};
+ enum GNUNET_GenericReturnValue ret;
- GNUNET_assert (GNUNET_OK ==
- GNUNET_log_setup ("taler-bank-transfer",
- "WARNING",
- NULL));
- global_ret = 1;
+ /* 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-bank-transfer",
- "Client tool of the Taler Wire Gateway",
- options,
- &run, NULL))
- return 1;
+ GNUNET_STRINGS_get_utf8_args (argc, argv,
+ &argc, &argv))
+ return 4;
+ global_ret = 1;
+ ret = GNUNET_PROGRAM_run (
+ argc, argv,
+ "taler-wire-gateway-client",
+ gettext_noop ("Client tool of the Taler Wire Gateway"),
+ options,
+ &run, NULL);
+ GNUNET_free_nz ((void *) argv);
+ if (GNUNET_SYSERR == ret)
+ return 3;
+ if (GNUNET_NO == ret)
+ return 0;
return global_ret;
}
-/* end taler-bank-transfer.c */
+/* end taler-wire-gateway-client.c */
diff --git a/src/exchange-tools/taler-auditor-offline.c b/src/exchange-tools/taler-auditor-offline.c
index 7a354edfb..aa9ed33ea 100644
--- a/src/exchange-tools/taler-auditor-offline.c
+++ b/src/exchange-tools/taler-auditor-offline.c
@@ -1313,22 +1313,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 ();
- GNUNET_assert (GNUNET_OK ==
- GNUNET_log_setup ("taler-auditor-offline",
- "WARNING",
- NULL));
if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc, argv,
- "taler-auditor-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-auditor-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;
}