summaryrefslogtreecommitdiffstats
path: root/dirmngr/server.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-07-24 18:14:37 +0200
committerWerner Koch <wk@gnupg.org>2017-07-24 20:09:52 +0200
commit9b88cfa0962f28894658cff8777fe7a217c6f700 (patch)
tree820eef800cf7ecf091e4465d145a47d2ba767ab4 /dirmngr/server.c
parentg10: Make sure to emit NEED_PASSPHRASE on --import of secret key. (diff)
downloadgnupg2-9b88cfa0962f28894658cff8777fe7a217c6f700.tar.xz
gnupg2-9b88cfa0962f28894658cff8777fe7a217c6f700.zip
dirmngr: New function dirmngr_status_printf.
* dirmngr/server.c (dirmngr_status_printf): New. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'dirmngr/server.c')
-rw-r--r--dirmngr/server.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/dirmngr/server.c b/dirmngr/server.c
index 788bebdfa..903953486 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -2776,6 +2776,24 @@ dirmngr_status_help (ctrl_t ctrl, const char *text)
return err;
}
+
+/* This function is similar to print_assuan_status but takes a CTRL
+ * arg instead of an assuan context as first argument. */
+gpg_error_t
+dirmngr_status_printf (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;
+}
+
+
/* Send a tick progress indicator back. Fixme: This is only done for
the currently active channel. */
gpg_error_t