From 99b17bf92d27ade6370c3d7818a7d1c45d3d24e9 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Thu, 13 Dec 2007 20:16:21 -0500 Subject: [PATCH] Don't call assuan_process_done() in client_thread() again after the pinentry finalize callback returns. --- src/commands.c | 2 +- src/pinentry.c | 8 +++----- src/pwmd.c | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/commands.c b/src/commands.c index aa23eead..e39cb05d 100644 --- a/src/commands.c +++ b/src/commands.c @@ -583,7 +583,7 @@ static int open_command(assuan_context_t ctx, char *line) if (error) { cleanup_client(client); - return error; + return send_error(ctx, error); } client->pinentry->cb = open_command_finalize; diff --git a/src/pinentry.c b/src/pinentry.c index 273c0827..20e76ce6 100644 --- a/src/pinentry.c +++ b/src/pinentry.c @@ -405,10 +405,8 @@ gpg_error_t pinentry_fork(assuan_context_t ctx) gsize len; gchar *result; - if (pipe(p) == -1) { - error = gpg_error_from_syserror(); - return send_error(ctx, error); - } + if (pipe(p) == -1) + return gpg_error_from_syserror(); pid = pth_fork(); @@ -417,7 +415,7 @@ gpg_error_t pinentry_fork(assuan_context_t ctx) error = gpg_error_from_syserror(); close(p[0]); close(p[1]); - return send_error(ctx, error); + return error; case 0: signal(SIGALRM, catchsig); signal(SIGTERM, catchsig); diff --git a/src/pwmd.c b/src/pwmd.c index ae697d6c..802e6baf 100644 --- a/src/pwmd.c +++ b/src/pwmd.c @@ -445,8 +445,6 @@ static void *client_thread(void *data) strlen(pk.key)); rc = cl->pinentry->cb(cl->ctx, shakey, FALSE); memset(shakey, 0, sizeof(shakey)); - rc = assuan_process_done(cl->ctx, - gpg_err_make(GPG_ERR_SOURCE_USER_1, rc)); } } else if (len == -1) -- 2.11.4.GIT