diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-27 16:50:53 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-27 16:50:53 +0000 |
commit | ac3af8b61e9601d9585510d99891e993eb3a2722 (patch) | |
tree | 531ae6aab2e4122cbc5d03b0580876ecd68d77c9 /src/socketengine.cpp | |
parent | 27d4ea0d970ed95cf21acedf72a08611ea082d72 (diff) |
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
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r-- | src/socketengine.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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; +} + |