From 14004479dc1d471c4388f0ab7f86f869ba7f098a Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 3 May 2006 09:28:01 +0000 Subject: Checks for negative fd's when adding them to the socketengine so we can generate less debug output git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3929 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/socket.cpp') diff --git a/src/socket.cpp b/src/socket.cpp index c4129f67c..a6847fce1 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -177,8 +177,11 @@ int BindPorts(bool bail) else { /* Associate the new open port with a slot in the socket engine */ - ServerInstance->SE->AddFd(openSockfd[count],true,X_LISTEN); - BoundPortCount++; + if (openSockfd[count] > -1) + { + ServerInstance->SE->AddFd(openSockfd[count],true,X_LISTEN); + BoundPortCount++; + } } } return InitialPortCount + BoundPortCount; -- cgit v1.3.1-10-gc9f91