diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-21 16:23:40 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-21 16:23:40 +0000 |
commit | 92d179769cc3da365f56944e9dad203ab084532f (patch) | |
tree | 277c9775740d284815c2f65ede5d076b1a2d238b /src/socketengine_iocp.cpp | |
parent | a2b40829c116cd67d5f293404371eb132dcaa8e3 (diff) |
I broke socketengine_iocp with some fixes. Fixed again.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7488 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengine_iocp.cpp')
-rw-r--r-- | src/socketengine_iocp.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/socketengine_iocp.cpp b/src/socketengine_iocp.cpp index b856ebdf8..ff1c7a0bc 100644 --- a/src/socketengine_iocp.cpp +++ b/src/socketengine_iocp.cpp @@ -12,6 +12,7 @@ */ #include "socketengine_iocp.h" +#include "exitcodes.h" #include <mswsock.h> IOCPEngine::IOCPEngine(InspIRCd * Instance) : SocketEngine(Instance) @@ -19,7 +20,7 @@ IOCPEngine::IOCPEngine(InspIRCd * Instance) : SocketEngine(Instance) /* Create completion port */ m_completionPort = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, (ULONG_PTR)0, 0); - if (m_completionPort == -1) + if (!m_completionPort) { ServerInstance->Log(SPARSE,"ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features."); ServerInstance->Log(SPARSE,"ERROR: this is a fatal error, exiting now."); @@ -50,7 +51,7 @@ bool IOCPEngine::AddFd(EventHandler* eh) int opt_len = sizeof(int); /* In range? */ - if ((fake_fd < 0) || (fake_fd > MAX_DESCRIPTOR)) + if ((fake_fd < 0) || (fake_fd > MAX_DESCRIPTORS)) return false; /* Already an entry here */ @@ -175,7 +176,7 @@ bool IOCPEngine::PostCompletionEvent(EventHandler * eh, SocketIOEvent type, int void IOCPEngine::PostReadEvent(EventHandler * eh) { if (!eh) - return false; + return; Overlapped * ov = new Overlapped(SOCKET_IO_EVENT_READ_READY, 0); DWORD flags = 0; |