diff options
author | Werner Koch <[email protected]> | 2012-02-07 11:46:32 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2012-02-07 11:46:32 +0000 |
commit | e78585cd0f553d92f332e33810ab636758bc88a2 (patch) | |
tree | a2685ce99e3f76607c0d5cfe0b05398e3dcd330e /agent/command.c | |
parent | Add an item to NEWS. (diff) | |
download | gnupg-e78585cd0f553d92f332e33810ab636758bc88a2.tar.gz gnupg-e78585cd0f553d92f332e33810ab636758bc88a2.zip |
agent: New function agent_print_status.
* common/asshelp2.c (vprint_assuan_status): New.
(print_assuan_status): Re-implement using above func.
* agent/command.c (agent_print_status): New.
Diffstat (limited to 'agent/command.c')
-rw-r--r-- | agent/command.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/agent/command.c b/agent/command.c index a369c4fb7..6fd3f65ff 100644 --- a/agent/command.c +++ b/agent/command.c @@ -413,6 +413,22 @@ agent_write_status (ctrl_t ctrl, const char *keyword, ...) } +/* This function is similar to print_assuan_status but takes a CTRL + arg instead of an assuan context as first argument. */ +gpg_error_t +agent_print_status (ctrl_t ctrl, const char *keyword, const char *format, ...) +{ + gpg_error_t err; + va_list arg_ptr; + assuan_context_t ctx = ctrl->server_local->assuan_ctx; + + va_start (arg_ptr, format); + err = vprint_assuan_status (ctx, keyword, format, arg_ptr); + va_end (arg_ptr); + return err; +} + + /* Helper to notify the client about a launched Pinentry. Because that might disturb some older clients, this is only done if enabled via an option. Returns an gpg error code. */ |