[glib] Fix connect on win32
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [glib] Fix connect on win32
- Date: Wed, 20 May 2009 10:43:11 -0400 (EDT)
commit 14d53dcfa8a781a79bd61f50bb73c4a1b3b7857e
Author: Alexander Larsson <alexl redhat com>
Date: Wed May 20 16:28:20 2009 +0200
Fix connect on win32
We should not wait before calling connect for non-blocking connect.
Also, use the right error code for the nonblocking pending case on win32.
---
gio/gsocket.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/gio/gsocket.c b/gio/gsocket.c
index 03f5375..a10a92b 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -1418,11 +1418,6 @@ g_socket_connect (GSocket *socket,
while (1)
{
- if (socket->priv->blocking &&
- !g_socket_condition_wait (socket,
- G_IO_IN, NULL, error))
- return FALSE;
-
if (connect (socket->priv->fd, (struct sockaddr *) &buffer,
g_socket_address_get_native_size (address)) < 0)
{
@@ -1434,7 +1429,7 @@ g_socket_connect (GSocket *socket,
#ifndef G_OS_WIN32
if (errsv == EINPROGRESS)
#else
- if (errsv == WSAEINPROGRESS)
+ if (errsv == WSAEWOULDBLOCK)
#endif
{
if (socket->priv->blocking)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]