mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
W32 related keyserver fixes.
This commit is contained in:
parent
6e17d90e09
commit
08a612f26e
10 changed files with 67 additions and 42 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-04-21 Werner Koch <wk@g10code.com>
|
||||
|
||||
* http.c (http_wait_response) [W32]: Use DuplicateHandle because
|
||||
it is a socket.
|
||||
(cookie_read) [W32]: Use recv in place of read.
|
||||
|
||||
2008-04-08 Werner Koch <wk@g10code.com>
|
||||
|
||||
* i18n.c (i18n_switchto_utf8, i18n_switchback)
|
||||
|
|
|
@ -396,7 +396,16 @@ http_wait_response (http_t hd)
|
|||
else
|
||||
#endif /*HTTP_USE_ESTREAM*/
|
||||
{
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
HANDLE handle = (HANDLE)hd->sock;
|
||||
if (!DuplicateHandle (GetCurrentProcess(), handle,
|
||||
GetCurrentProcess(), &handle, 0,
|
||||
TRUE, DUPLICATE_SAME_ACCESS ))
|
||||
return gpg_error_from_syserror ();
|
||||
hd->sock = (int)handle;
|
||||
#else
|
||||
hd->sock = dup (hd->sock);
|
||||
#endif
|
||||
if (hd->sock == -1)
|
||||
return gpg_error_from_syserror ();
|
||||
}
|
||||
|
@ -1490,7 +1499,7 @@ start_server ()
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Actually connect to a server. Returns the file descripto or -1 on
|
||||
/* Actually connect to a server. Returns the file descriptor or -1 on
|
||||
error. ERRNO is set on error. */
|
||||
static int
|
||||
connect_server (const char *server, unsigned short port,
|
||||
|
@ -1765,7 +1774,12 @@ cookie_read (void *cookie, void *buffer, size_t size)
|
|||
{
|
||||
do
|
||||
{
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
/* Under Windows we need to use recv for a socket. */
|
||||
nread = recv (c->fd, buffer, size, 0);
|
||||
#else
|
||||
nread = read (c->fd, buffer, size);
|
||||
#endif
|
||||
}
|
||||
while (nread == -1 && errno == EINTR);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ i18n_switchto_utf8 (void)
|
|||
{
|
||||
#ifdef USE_SIMPLE_GETTEXT
|
||||
gettext_select_utf8 (1);
|
||||
#elif define(ENABLE_NLS)
|
||||
#elif defined(ENABLE_NLS)
|
||||
char *orig_codeset = bind_textdomain_codeset (PACKAGE_GT, NULL);
|
||||
# ifdef HAVE_LANGINFO_CODESET
|
||||
if (!orig_codeset)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue