From b4f8fcb0e11a5079783b6a95d7c9a80b49d886b9 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Wed, 24 Apr 2002 23:18:53 +0000 Subject: 2002-04-25 Marcus Brinkmann * agent.h (agent_get_confirmation): Replace paramter prompt with two parameters ok and cancel. * query.c (agent_get_confirmation): Likewise. Implement this. * trustlist.c (agent_marktrusted): Fix invocation of agent_get_confirmation. * divert-scd.c (ask_for_card): Likewise. --- agent/query.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'agent/query.c') diff --git a/agent/query.c b/agent/query.c index 4243f0026..c7e05a099 100644 --- a/agent/query.c +++ b/agent/query.c @@ -353,7 +353,7 @@ agent_get_passphrase (char **retpass, const char *desc, const char *prompt, confirmed it, GNUPG_Not_Confirmed for what the text says or an other error. */ int -agent_get_confirmation (const char *desc, const char *prompt) +agent_get_confirmation (const char *desc, const char *ok, const char *cancel) { int rc; char line[ASSUAN_LINELENGTH]; @@ -371,9 +371,17 @@ agent_get_confirmation (const char *desc, const char *prompt) if (rc) return map_assuan_err (rc); - if (prompt) + if (ok) { - snprintf (line, DIM(line)-1, "SETPROMPT %s", prompt); + snprintf (line, DIM(line)-1, "SETOK %s", ok); + line[DIM(line)-1] = 0; + rc = assuan_transact (entry_ctx, line, NULL, NULL, NULL, NULL, NULL, NULL); + if (rc) + return map_assuan_err (rc); + } + if (cancel) + { + snprintf (line, DIM(line)-1, "SETCANCEL %s", cancel); line[DIM(line)-1] = 0; rc = assuan_transact (entry_ctx, line, NULL, NULL, NULL, NULL, NULL, NULL); if (rc) -- cgit