mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
More work on the dirmngr. It now builds for W32 and W32CE and quick
tests show that it works on W32.
This commit is contained in:
parent
be622bd268
commit
dc5a80930b
14 changed files with 353 additions and 153 deletions
|
@ -44,6 +44,7 @@
|
|||
|
||||
|
||||
#define JNLIB_NEED_LOG_LOGV
|
||||
#define JNLIB_NEED_AFLOCAL
|
||||
#include "dirmngr.h"
|
||||
|
||||
#include <assuan.h>
|
||||
|
@ -963,12 +964,17 @@ main (int argc, char **argv)
|
|||
memset (&serv_addr, 0, sizeof serv_addr);
|
||||
serv_addr.sun_family = AF_UNIX;
|
||||
strcpy (serv_addr.sun_path, socket_name);
|
||||
len = (offsetof (struct sockaddr_un, sun_path)
|
||||
+ strlen (serv_addr.sun_path) + 1);
|
||||
len = SUN_LEN (&serv_addr);
|
||||
|
||||
rc = assuan_sock_bind (fd, (struct sockaddr*) &serv_addr, len);
|
||||
if (rc == -1 && errno == EADDRINUSE)
|
||||
if (rc == -1
|
||||
&& (errno == EADDRINUSE
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
|| errno == EEXIST
|
||||
#endif
|
||||
))
|
||||
{
|
||||
/* Fixme: We should test whether a dirmngr is already running. */
|
||||
gnupg_remove (socket_name);
|
||||
rc = assuan_sock_bind (fd, (struct sockaddr*) &serv_addr, len);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue