challenger

OAuth 2.0-based authentication service that validates user can receive messages at a certain address
Log | Files | Refs | Submodules | README | LICENSE

commit c820e0c0bc1ce465b3a6d59ee9a878ddf342af4d
parent 9d8ccf659b716c1da478e9868c57129d555feca4
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu,  2 Nov 2023 16:14:50 +0100

add -q option to challenger-admin

Diffstat:
Msrc/challenger/challenger-admin.c | 22++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/challenger/challenger-admin.c b/src/challenger/challenger-admin.c @@ -40,6 +40,11 @@ static char *client_secret; */ static int del_flag; +/** + * -q option: be quiet + */ +static int be_quiet; + /** * Main function that will be run. @@ -120,9 +125,14 @@ run (void *cls, global_ret = EXIT_FAILURE; goto cleanup; case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, - "Client added. Client ID is: %llu\n", - (unsigned long long) row_id); + if (be_quiet) + fprintf (stdout, + "%llu\n", + (unsigned long long) row_id); + else + fprintf (stdout, + "Client added. Client ID is: %llu\n", + (unsigned long long) row_id); break; } } @@ -153,7 +163,11 @@ main (int argc, "delete", "delete client", &del_flag), - /* TODO: add -l / --list option */ + GNUNET_GETOPT_option_flag ('q', + "quiet", + "be less verbose in the output", + &be_quiet), + /* TODO: add -s / --show option */ GNUNET_GETOPT_OPTION_END }; enum GNUNET_GenericReturnValue ret;