diff options
author | Werner Koch <wk@gnupg.org> | 2010-04-26 16:51:38 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2010-04-26 16:51:38 +0200 |
commit | 5b341a9a47bf203829328016536101b24556802b (patch) | |
tree | 0931715537284f263e27bc476513185d80aa3087 /agent/gpg-agent.c | |
parent | Fix preference setting in new keys (diff) | |
download | gnupg2-5b341a9a47bf203829328016536101b24556802b.tar.xz gnupg2-5b341a9a47bf203829328016536101b24556802b.zip |
Ignore a stale agent socket.
Diffstat (limited to 'agent/gpg-agent.c')
-rw-r--r-- | agent/gpg-agent.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index aa0a40716..e30adb45b 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -1493,7 +1493,15 @@ create_server_socket (char *name, int is_ssh, assuan_sock_nonce_t *nonce) strcpy (serv_addr->sun_path, name); len = SUN_LEN (serv_addr); rc = assuan_sock_bind (fd, (struct sockaddr*) serv_addr, len); - if (use_standard_socket && rc == -1 && errno == EADDRINUSE) + + /* Our error code mapping on W32CE returns EEXIST thus we also test + for this. */ + if (use_standard_socket && rc == -1 + && (errno == EADDRINUSE +#ifdef HAVE_W32_SYSTEM + || errno == EEXIST +#endif + )) { /* Check whether a gpg-agent is already running on the standard socket. We do this test only if this is not the ssh socket. |