[Pkg-gnupg-commit] [gnupg2] 142/185: dirmngr: New function dirmngr_status_printf.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Aug 7 11:55:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 9b88cfa0962f28894658cff8777fe7a217c6f700
Author: Werner Koch <wk at gnupg.org>
Date: Mon Jul 24 18:14:37 2017 +0200
dirmngr: New function dirmngr_status_printf.
* dirmngr/server.c (dirmngr_status_printf): New.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
dirmngr/dirmngr.h | 3 +++
dirmngr/server.c | 18 ++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/dirmngr/dirmngr.h b/dirmngr/dirmngr.h
index 0f5dde2..1f660de 100644
--- a/dirmngr/dirmngr.h
+++ b/dirmngr/dirmngr.h
@@ -229,6 +229,9 @@ int dirmngr_assuan_log_monitor (assuan_context_t ctx, unsigned int cat,
void start_command_handler (gnupg_fd_t fd);
gpg_error_t dirmngr_status (ctrl_t ctrl, const char *keyword, ...);
gpg_error_t dirmngr_status_help (ctrl_t ctrl, const char *text);
+gpg_error_t dirmngr_status_printf (ctrl_t ctrl, const char *keyword,
+ const char *format,
+ ...) GPGRT_ATTR_PRINTF(3,4);
gpg_error_t dirmngr_tick (ctrl_t ctrl);
/*-- http-ntbtls.c --*/
diff --git a/dirmngr/server.c b/dirmngr/server.c
index 788bebd..9039534 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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list