aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2013-01-25 05:17:29 +0000
committerNIIBE Yutaka <[email protected]>2013-01-25 14:20:46 +0000
commit19994466449a93704d38d429ca1ea36f63da0bf0 (patch)
tree41cde934234b2c493c31aa95b20be253a401375e
parentgpg: Fix honoring --cert-digest-algo when recreating a cert (diff)
downloadgnupg-19994466449a93704d38d429ca1ea36f63da0bf0.tar.gz
gnupg-19994466449a93704d38d429ca1ea36f63da0bf0.zip
agent: Fix a bug of handling return code from npth_join.
* agent/call-pinentry.c (agent_popup_message_stop): Fix npth_join return code. -- pth_join returns TRUE (1) on success. But npth_join (and pthread_join) returns 0 on success, returns error number on error.
-rw-r--r--agent/call-pinentry.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index c37831a05..c6b6b5282 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -1266,9 +1266,9 @@ agent_popup_message_stop (ctrl_t ctrl)
/* Now wait for the thread to terminate. */
rc = npth_join (popup_tid, NULL);
- if (!rc)
+ if (rc)
log_debug ("agent_popup_message_stop: pth_join failed: %s\n",
- strerror (errno));
+ strerror (rc));
/* Thread IDs are opaque, but we try our best here by resetting it
to the same content that a static global variable has. */
memset (&popup_tid, '\0', sizeof (popup_tid));