From e7cd5291db8df13ca60c081727c7d804308c8737 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 24 Mar 2012 14:57:33 +0100 Subject: sock_exec: Avoid sys_connect. --- source3/lib/sock_exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/lib/sock_exec.c b/source3/lib/sock_exec.c index 2333d7c739..419d60d05c 100644 --- a/source3/lib/sock_exec.c +++ b/source3/lib/sock_exec.c @@ -60,7 +60,7 @@ static int socketpair_tcp(int fd[2]) sock.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - if (sys_connect(fd[1], (struct sockaddr *)&sock) == -1) { + if (connect(fd[1], (struct sockaddr *)&sock, socklen) == -1) { if (errno != EINPROGRESS) goto failed; } else { connect_done = 1; @@ -70,7 +70,7 @@ static int socketpair_tcp(int fd[2]) close(listener); if (connect_done == 0) { - if (sys_connect(fd[1], (struct sockaddr *)&sock) != 0 + if (connect(fd[1], (struct sockaddr *)&sock, salen) != 0 && errno != EISCONN) goto failed; } -- cgit