From: Ted Lemon Date: Tue, 19 Oct 1999 15:37:08 +0000 (+0000) Subject: - Set O_NONBLOCK on incoming connections (we were already doing this X-Git-Tag: BCTEL_SPECIAL_19991124~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e857fa8cee1bfcdc6a3c6615a73beeaa207566a7;p=thirdparty%2Fdhcp.git - Set O_NONBLOCK on incoming connections (we were already doing this for outgoing connections). --- diff --git a/omapip/listener.c b/omapip/listener.c index fa1f65d37..cb58cbbfa 100644 --- a/omapip/listener.c +++ b/omapip/listener.c @@ -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);