From ac3af8b61e9601d9585510d99891e993eb3a2722 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 27 Jul 2007 16:50:53 +0000 Subject: Some smart tricks to eliminate win32 ifdefs that are creeping into portable files git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7589 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengine.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/socketengine.cpp') diff --git a/src/socketengine.cpp b/src/socketengine.cpp index 48f7e11bf..28ba8c252 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -91,3 +91,12 @@ std::string SocketEngine::GetName() return "misconfigured"; } +bool SocketEngine::BoundsCheckFd(EventHandler* eh) +{ + if (!eh) + return false; + if ((eh->GetFd() < 0) || (eh->GetFd() > MAX_DESCRIPTORS)) + return false; + return true; +} + -- cgit v1.2.3