]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/socketengine.cpp
Pick up a few error conditions we didnt before in the config reader, and also increme...
[user/henk/code/inspircd.git] / src / socketengine.cpp
index 895f21306672e2855e8a582d7f9b0f73253b267e..28ba8c25215c3d2921d909f219dc8ae026d617ab 100644 (file)
@@ -2,22 +2,16 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *                <Craig@chatspike.net>
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
  *
- * Written by Craig Edwards, Craig McLure, and others.
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
  *
  * ---------------------------------------------------
  */
 
-#include "inspircd_config.h"
 #include "inspircd.h"
-#include <vector>
-#include <string>
 #include "socketengine.h"
 
 int EventHandler::GetFd()
@@ -40,6 +34,10 @@ bool EventHandler::Writeable()
        return false;
 }
 
+void SocketEngine::WantWrite(EventHandler* eh)
+{
+}
+
 SocketEngine::SocketEngine(InspIRCd* Instance) : ServerInstance(Instance)
 {
        memset(ref, 0, sizeof(ref));
@@ -64,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;
 }
@@ -93,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;
+}
+