diff options
Diffstat (limited to 'src/testing/testing_api_cmd_revoke.c')
-rw-r--r-- | src/testing/testing_api_cmd_revoke.c | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/src/testing/testing_api_cmd_revoke.c b/src/testing/testing_api_cmd_revoke.c index 1006fbc34..f734be1a4 100644 --- a/src/testing/testing_api_cmd_revoke.c +++ b/src/testing/testing_api_cmd_revoke.c @@ -79,13 +79,14 @@ revoke_cleanup (void *cls, if (NULL != rs->revoke_proc) { - GNUNET_break (0 == GNUNET_OS_process_kill - (rs->revoke_proc, SIGKILL)); + GNUNET_break (0 == + GNUNET_OS_process_kill (rs->revoke_proc, + SIGKILL)); GNUNET_OS_process_wait (rs->revoke_proc); GNUNET_OS_process_destroy (rs->revoke_proc); rs->revoke_proc = NULL; } - GNUNET_free_non_null (rs->dhks); + GNUNET_free (rs->dhks); GNUNET_free (rs); } @@ -99,7 +100,7 @@ revoke_cleanup (void *cls, * @param index index number of the object to offer. * @return #GNUNET_OK on success */ -static int +static enum GNUNET_GenericReturnValue revoke_traits (void *cls, const void **ret, const char *trait, @@ -109,8 +110,7 @@ revoke_traits (void *cls, struct TALER_TESTING_Trait traits[] = { /* Needed by the handler which waits the proc' * death and calls the next command */ - TALER_TESTING_make_trait_process (0, - &rs->revoke_proc), + TALER_TESTING_make_trait_process (&rs->revoke_proc), TALER_TESTING_trait_end () }; @@ -122,9 +122,7 @@ revoke_traits (void *cls, /** - * Run the "revoke" command. The core of the function - * is to call the "keyup" utility passing it the base32 - * encoding of the denomination to revoke. + * Run the "revoke" command. * * @param cls closure. * @param cmd the command to execute. @@ -143,14 +141,12 @@ revoke_run (void *cls, /* Get denom pub from trait */ coin_cmd = TALER_TESTING_interpreter_lookup_command (is, rs->coin_reference); - if (NULL == coin_cmd) { GNUNET_break (0); TALER_TESTING_interpreter_fail (is); return; } - GNUNET_assert (GNUNET_OK == TALER_TESTING_get_trait_denom_pub (coin_cmd, 0, @@ -163,14 +159,13 @@ revoke_run (void *cls, rs->dhks = GNUNET_STRINGS_data_to_string_alloc ( &denom_pub->h_key, sizeof (struct GNUNET_HashCode)); - - rs->revoke_proc = GNUNET_OS_start_process (GNUNET_NO, - GNUNET_OS_INHERIT_STD_ALL, + rs->revoke_proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, - "taler-exchange-keyup", - "taler-exchange-keyup", + "taler-exchange-offline", + "taler-exchange-offline", "-c", rs->config_filename, - "-r", rs->dhks, + "revoke-denomination", rs->dhks, + "upload", NULL); if (NULL == rs->revoke_proc) @@ -181,22 +176,10 @@ revoke_run (void *cls, } GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Revoke is ongoing..\n"); - - is->reload_keys = GNUNET_OK; TALER_TESTING_wait_for_sigchld (is); } -/** - * Make a "revoke" command. - * - * @param label the command label. - * @param expected_response_code expected HTTP status code. - * @param coin_reference reference to a CMD that will offer the - * denomination to revoke. - * @param config_filename configuration file name. - * @return the command. - */ struct TALER_TESTING_Command TALER_TESTING_cmd_revoke (const char *label, unsigned int expected_response_code, |