diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-19 21:48:45 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-19 21:48:45 +0000 |
commit | 2fe8bdb5a47b0258bae9d7893bef50b2f50afc5c (patch) | |
tree | 38b3f6ec6d81bc478ce44e923e37d932a4bffc53 /src | |
parent | 8d46dbfb1e88c0caa6480c0e1e1504f179c6e807 (diff) |
Whoops, someone forgot to check the return value when initializing windows IOCP
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7476 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/socketengine_iocp.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/socketengine_iocp.cpp b/src/socketengine_iocp.cpp index 0f1e7e9af..b856ebdf8 100644 --- a/src/socketengine_iocp.cpp +++ b/src/socketengine_iocp.cpp @@ -19,6 +19,15 @@ IOCPEngine::IOCPEngine(InspIRCd * Instance) : SocketEngine(Instance) /* Create completion port */ m_completionPort = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, (ULONG_PTR)0, 0); + if (m_completionPort == -1) + { + 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."); + printf("ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features."); + printf("ERROR: this is a fatal error, exiting now."); + InspIRCd::Exit(EXIT_STATUS_SOCKETENGINE); + } + /* Null variables out. */ CurrentSetSize = 0; EngineHandle = 0; |