summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Faulhammer <opfer@gentoo.org>2008-10-03 18:52:07 +0000
committerChristian Faulhammer <opfer@gentoo.org>2008-10-03 18:52:07 +0000
commit70040b50408b2bb54808a05779f68cfbec29922b (patch)
tree3493a4ae26ccb2ae66e7d06f6a8c18d42a65512e /dev-lang/erlang/files
parentVersion bump. (diff)
downloadgentoo-2-70040b50408b2bb54808a05779f68cfbec29922b.tar.gz
gentoo-2-70040b50408b2bb54808a05779f68cfbec29922b.tar.bz2
gentoo-2-70040b50408b2bb54808a05779f68cfbec29922b.zip
fix severe runtime issues with get_tcp function, taken from upstream as reported in bug 239173 by Oscar Hellström <oscar AT oscarh DOT net>
(Portage version: 2.1.4.4)
Diffstat (limited to 'dev-lang/erlang/files')
-rw-r--r--dev-lang/erlang/files/erlang-12.2.4-inet_drv.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/dev-lang/erlang/files/erlang-12.2.4-inet_drv.patch b/dev-lang/erlang/files/erlang-12.2.4-inet_drv.patch
new file mode 100644
index 000000000000..8baca6ebe3c0
--- /dev/null
+++ b/dev-lang/erlang/files/erlang-12.2.4-inet_drv.patch
@@ -0,0 +1,31 @@
+--- otp_src_R12B-4.orig/erts/emulator/drivers/common/inet_drv.c 2008-09-01 05:51:18.000000000 -0700
++++ otp_src_R12B-4/erts/emulator/drivers/common/inet_drv.c 2008-09-30 10:38:06.000000000 -0700
+@@ -7239,19 +7239,18 @@
+ buf, &len) == NULL)
+ return ctl_error(EINVAL, rbuf, rsize);
+
+- sock_select(INETP(desc), FD_CONNECT, 1);
+ code = sock_connect(desc->inet.s,
+ (struct sockaddr*) &desc->inet.remote, len);
+ if ((code == SOCKET_ERROR) &&
+ ((sock_errno() == ERRNO_BLOCK) || /* Winsock2 */
+ (sock_errno() == EINPROGRESS))) { /* Unix & OSE!! */
+ desc->inet.state = TCP_STATE_CONNECTING;
++ sock_select(INETP(desc), FD_CONNECT, 1);
+ if (timeout != INET_INFINITY)
+ driver_set_timer(desc->inet.port, timeout);
+ enq_async(INETP(desc), tbuf, INET_REQ_CONNECT);
+ }
+ else if (code == 0) { /* ok we are connected */
+- sock_select(INETP(desc), FD_CONNECT, 0);
+ desc->inet.state = TCP_STATE_CONNECTED;
+ if (desc->inet.active)
+ sock_select(INETP(desc), (FD_READ|FD_CLOSE), 1);
+@@ -7259,7 +7258,6 @@
+ async_ok(INETP(desc));
+ }
+ else {
+- sock_select(INETP(desc), FD_CONNECT, 0);
+ return ctl_error(sock_errno(), rbuf, rsize);
+ }
+ return ctl_reply(INET_REP_OK, tbuf, 2, rbuf, rsize);