summaryrefslogtreecommitdiff
path: root/src/socketengine.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-05-16 11:39:56 +0000
committerGravatar brain2006-05-16 11:39:56 +0000
commite0366058980360ae0e7636796fe98bfa6280903a (patch)
treebf326fcf398c204ddcfd5a0c7d7ac85013476f34 /src/socketengine.cpp
parentBroken kline matching in connect code (reported by LeaChim) (diff)
Backport of epoll/kqueue failure checking
git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@3962 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r--src/socketengine.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp
index bcc8e23af..976f578fd 100644
--- a/src/socketengine.cpp
+++ b/src/socketengine.cpp
@@ -40,6 +40,17 @@ SocketEngine::SocketEngine()
#ifdef USE_KQUEUE
EngineHandle = kqueue();
#endif
+#ifdef USE_SELECT
+ EngineHandle = 0;
+#endif
+ if (EngineHandle == -1)
+ {
+ log(SPARSE,"ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features.");
+ 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.");
+ Exit(0);
+ }
CurrentSetSize = 0;
}