]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Set O_NONBLOCK on incoming connections (we were already doing this
authorTed Lemon <source@isc.org>
Tue, 19 Oct 1999 15:37:08 +0000 (15:37 +0000)
committerTed Lemon <source@isc.org>
Tue, 19 Oct 1999 15:37:08 +0000 (15:37 +0000)
  for outgoing connections).

omapip/listener.c

index fa1f65d378812a9365cfb38c48fc4d5c84082558..cb58cbbfafeeb58cd8b2def9b215a73b7499c117 100644 (file)
@@ -89,6 +89,12 @@ isc_result_t omapi_listen (omapi_object_t *h,
                return ISC_R_UNEXPECTED;
        }
 
+       if (fcntl (obj -> socket, F_SETFL, O_NONBLOCK) < 0) {
+               omapi_object_dereference ((omapi_object_t **)&obj,
+                                         "omapi_connect");
+               return ISC_R_UNEXPECTED;
+       }
+
        status = omapi_register_io_object ((omapi_object_t *)obj,
                                           omapi_listener_readfd, 0,
                                           omapi_accept, 0, 0);