From bb201fac2bc9233fcc00f48e88cc97e92181ca4e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 3 Mar 2011 15:31:04 +0100 Subject: s3-winbind: Fixed the accept() for new_connection. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/winbindd/winbindd.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source3/winbindd') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index a9ff410f52..766d8ef401 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -769,13 +769,15 @@ static void new_connection(int listen_sock, bool privileged) len = sizeof(sunaddr); - do { - sock = accept(listen_sock, (struct sockaddr *)(void *)&sunaddr, - &len); - } while (sock == -1 && errno == EINTR); + sock = accept(listen_sock, (struct sockaddr *)(void *)&sunaddr, &len); - if (sock == -1) + if (sock == -1) { + if (errno != EINTR) { + DEBUG(0, ("Faild to accept socket - %s\n", + strerror(errno))); + } return; + } DEBUG(6,("accepted socket %d\n", sock)); -- cgit