]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/socketengine.cpp
Add <hostchange:ports> to the m_hostchange module to implement feature in bug #363
[user/henk/code/inspircd.git] / src / socketengine.cpp
index 965df906ac8350c9a798f6e60584e39c5b182574..28ba8c25215c3d2921d909f219dc8ae026d617ab 100644 (file)
@@ -62,11 +62,11 @@ bool SocketEngine::HasFd(int fd)
 EventHandler* SocketEngine::GetRef(int fd)
 {
        if ((fd < 0) || (fd > MAX_DESCRIPTORS))
-               return false;
+               return 0;
        return ref[fd];
 }
 
-bool SocketEngine::DelFd(EventHandler* eh)
+bool SocketEngine::DelFd(EventHandler* eh, bool force)
 {
        return true;
 }
@@ -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;
+}
+