diff options
Diffstat (limited to 'agent/call-pinentry.c')
-rw-r--r-- | agent/call-pinentry.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index a895a8b8f..34eb77cfb 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -1481,15 +1481,16 @@ agent_get_confirmation (ctrl_t ctrl, npth_t thread; rc = watch_sock_start (&sock_watched, &thread); - if (rc) - return rc; - - rc = assuan_transact (entry_ctx, "CONFIRM", - NULL, NULL, NULL, NULL, NULL, NULL); - if (rc && gpg_err_source (rc) && gpg_err_code (rc) == GPG_ERR_ASS_CANCELED) - rc = gpg_err_make (gpg_err_source (rc), GPG_ERR_CANCELED); + if (!rc) + { + rc = assuan_transact (entry_ctx, "CONFIRM", + NULL, NULL, NULL, NULL, NULL, NULL); + if (rc && gpg_err_source (rc) + && gpg_err_code (rc) == GPG_ERR_ASS_CANCELED) + rc = gpg_err_make (gpg_err_source (rc), GPG_ERR_CANCELED); - watch_sock_end (&sock_watched, &thread); + watch_sock_end (&sock_watched, &thread); + } return unlock_pinentry (ctrl, rc); } |