diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-02-27 22:22:18 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-02-27 22:22:18 +0100 |
commit | cfab4194f08af08227d33d768d3e2001434bb6cd (patch) | |
tree | 46168872a1e9e85020eb2b104ea9f2aa0c38f7e7 /src/exchange-lib/testing_api_cmd_check_keys.c | |
parent | a3c72985155a162dce431b33601e330100e325c2 (diff) | |
download | exchange-cfab4194f08af08227d33d768d3e2001434bb6cd.tar.xz |
use more 'static' where applicable, use GNUNET_log instead of fprintf
Diffstat (limited to 'src/exchange-lib/testing_api_cmd_check_keys.c')
-rw-r--r-- | src/exchange-lib/testing_api_cmd_check_keys.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/exchange-lib/testing_api_cmd_check_keys.c b/src/exchange-lib/testing_api_cmd_check_keys.c index 8f77a83b4..b14740e40 100644 --- a/src/exchange-lib/testing_api_cmd_check_keys.c +++ b/src/exchange-lib/testing_api_cmd_check_keys.c @@ -48,6 +48,7 @@ struct CheckKeysState }; + /** * Run the command. * @@ -55,7 +56,7 @@ struct CheckKeysState * @param cmd the command to execute, a /wire one. * @param is the interpreter state. */ -void +static void check_keys_run (void *cls, const struct TALER_TESTING_Command *cmd, struct TALER_TESTING_Interpreter *is) @@ -92,8 +93,10 @@ check_keys_run (void *cls, { /* Did not get the expected number of denomination keys! */ GNUNET_break (0); - fprintf (stderr, "Got %u keys in step %s\n", - is->keys->num_denom_keys, cmd->label); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Got %u keys in step %s\n", + is->keys->num_denom_keys, + cmd->label); TALER_TESTING_interpreter_fail (is); return; } @@ -107,7 +110,7 @@ check_keys_run (void *cls, * @param cls closure, typically a #struct SignalState. * @param cmd the command which is being cleaned up. */ -void +static void check_keys_cleanup (void *cls, const struct TALER_TESTING_Command *cmd) { @@ -116,6 +119,7 @@ check_keys_cleanup (void *cls, GNUNET_free (cks); } + /** * Make a "check keys" command. * @@ -132,22 +136,16 @@ TALER_TESTING_cmd_check_keys unsigned int num_denom_keys, struct TALER_EXCHANGE_Handle *exchange) { - struct CheckKeysState *cks; struct TALER_TESTING_Command cmd; cks = GNUNET_new (struct CheckKeysState); - cks->generation = generation; cks->num_denom_keys = num_denom_keys; cks->exchange = exchange; - cmd.cls = cks; cmd.label = label; cmd.run = &check_keys_run; cmd.cleanup = &check_keys_cleanup; - return cmd; - - } |