Author: zoltan
Date: 2008-01-28 18:28:28 -0500 (Mon, 28 Jan 2008)
New Revision: 94195
Modified:
trunk/mono/mono/io-layer/ChangeLog
trunk/mono/mono/io-layer/sockets.c
Log:
2008-01-29 Zoltan Varga <[EMAIL PROTECTED]>
* sockets.c (_wapi_connect): Add a workaround to a solaris x86 problem
where
getsockopt (SO_ERROR) doesn't return after connect () fails. Fixes
#356552.
Modified: trunk/mono/mono/io-layer/ChangeLog
===================================================================
--- trunk/mono/mono/io-layer/ChangeLog 2008-01-28 23:16:16 UTC (rev 94194)
+++ trunk/mono/mono/io-layer/ChangeLog 2008-01-28 23:28:28 UTC (rev 94195)
@@ -1,3 +1,8 @@
+2008-01-29 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * sockets.c (_wapi_connect): Add a workaround to a solaris x86 problem
where
+ getsockopt (SO_ERROR) doesn't return after connect () fails. Fixes
#356552.
+
2008-01-23 Dick Porter <[EMAIL PROTECTED]>
* versioninfo.c (get_string_block): When stepping over the
Modified: trunk/mono/mono/io-layer/sockets.c
===================================================================
--- trunk/mono/mono/io-layer/sockets.c 2008-01-28 23:16:16 UTC (rev 94194)
+++ trunk/mono/mono/io-layer/sockets.c 2008-01-28 23:28:28 UTC (rev 94195)
@@ -312,6 +312,18 @@
errnum = WSAEWOULDBLOCK; /* see bug #73053 */
WSASetLastError (errnum);
+
+ /*
+ * On solaris x86 getsockopt (SO_ERROR) is not set
after
+ * connect () fails so we need to save this error.
+ */
+ ok = _wapi_lookup_handle (handle, WAPI_HANDLE_SOCKET,
+ (gpointer *)&socket_handle);
+ if (ok == FALSE) {
+ g_warning ("%s: error looking up socket handle
%p", __func__, handle);
+ } else {
+ socket_handle->saved_error = errnum;
+ }
return(SOCKET_ERROR);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches