summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2013-06-04 14:34:10 +0000
committerDamien Doligez <damien.doligez-inria.fr>2013-06-04 14:34:10 +0000
commit3f8076d645155e526c2b7198677898910dc45766 (patch)
tree683489d238c07588c1cdd0e2bf660031aec90966
parent207f9fb7f733c359f984446dd96f31a84f6ac939 (diff)
PR#5325: re-do commit 11966, which was undone by mistake
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13743 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--otherlibs/win32unix/accept.c15
-rw-r--r--otherlibs/win32unix/socket.c15
2 files changed, 0 insertions, 30 deletions
diff --git a/otherlibs/win32unix/accept.c b/otherlibs/win32unix/accept.c
index f2e14467a..6776a4ac3 100644
--- a/otherlibs/win32unix/accept.c
+++ b/otherlibs/win32unix/accept.c
@@ -25,30 +25,15 @@ CAMLprim value unix_accept(sock)
SOCKET sconn = Socket_val(sock);
SOCKET snew;
value fd = Val_unit, adr = Val_unit, res;
- int oldvalue, oldvaluelen, newvalue, retcode;
union sock_addr_union addr;
socklen_param_type addr_len;
DWORD err = 0;
- oldvaluelen = sizeof(oldvalue);
- retcode = getsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
- (char *) &oldvalue, &oldvaluelen);
- if (retcode == 0) {
- /* Set sockets to synchronous mode */
- newvalue = SO_SYNCHRONOUS_NONALERT;
- setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
- (char *) &newvalue, sizeof(newvalue));
- }
addr_len = sizeof(sock_addr);
enter_blocking_section();
snew = accept(sconn, &addr.s_gen, &addr_len);
if (snew == INVALID_SOCKET) err = WSAGetLastError ();
leave_blocking_section();
- if (retcode == 0) {
- /* Restore initial mode */
- setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
- (char *) &oldvalue, oldvaluelen);
- }
if (snew == INVALID_SOCKET) {
win32_maperr(err);
uerror("accept", Nothing);
diff --git a/otherlibs/win32unix/socket.c b/otherlibs/win32unix/socket.c
index ad8165b29..f6e7038ce 100644
--- a/otherlibs/win32unix/socket.c
+++ b/otherlibs/win32unix/socket.c
@@ -32,7 +32,6 @@ CAMLprim value unix_socket(domain, type, proto)
value domain, type, proto;
{
SOCKET s;
- int oldvalue, oldvaluelen, newvalue, retcode;
#ifndef HAS_IPV6
/* IPv6 requires WinSock2, we must raise an error on PF_INET6 */
@@ -42,23 +41,9 @@ CAMLprim value unix_socket(domain, type, proto)
}
#endif
- oldvaluelen = sizeof(oldvalue);
- retcode = getsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
- (char *) &oldvalue, &oldvaluelen);
- if (retcode == 0) {
- /* Set sockets to synchronous mode */
- newvalue = SO_SYNCHRONOUS_NONALERT;
- setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
- (char *) &newvalue, sizeof(newvalue));
- }
s = socket(socket_domain_table[Int_val(domain)],
socket_type_table[Int_val(type)],
Int_val(proto));
- if (retcode == 0) {
- /* Restore initial mode */
- setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE,
- (char *) &oldvalue, oldvaluelen);
- }
if (s == INVALID_SOCKET) {
win32_maperr(WSAGetLastError());
uerror("socket", Nothing);