s3-rpc_server: Fixed the accept() for tcpip_listener.
authorAndreas Schneider <asn@samba.org>
Thu, 3 Mar 2011 14:07:02 +0000 (15:07 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 8 Mar 2011 10:41:30 +0000 (11:41 +0100)
Signed-off-by: Günther Deschner <gd@samba.org>
source3/rpc_server/rpc_server.c

index 47e223c00a4e1f492852866ab05f95e36fd9624b..2168f67909567035c350d751c00131496a5cbb43 100644 (file)
@@ -796,16 +796,12 @@ static void dcerpc_ncacn_tcpip_listener(struct tevent_context *ev,
        int s = -1;
        int rc;
 
-       while (s == -1) {
-               s = accept(state->fd, (struct sockaddr *)(void *) &addr, &in_addrlen);
-               if (s == -1 && errno != EINTR) {
-                       break;
-               }
-       }
-
+       s = accept(state->fd, (struct sockaddr *)(void *) &addr, &in_addrlen);
        if (s == -1) {
-               DEBUG(0,("tcpip_listener accept: %s\n",
-                        strerror(errno)));
+               if (errno != EINTR) {
+                       DEBUG(0,("tcpip_listener accept: %s\n",
+                                strerror(errno)));
+               }
                return;
        }