From 575335b6aa12f19a1522679d2ba07f55b633b316 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 1 Oct 2006 22:13:11 +0000 Subject: Extra debugging git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5378 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengine_epoll.cpp | 3 +++ src/socketengine_kqueue.cpp | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/socketengine_epoll.cpp b/src/socketengine_epoll.cpp index 2e3f28af6..163bd45c6 100644 --- a/src/socketengine_epoll.cpp +++ b/src/socketengine_epoll.cpp @@ -52,7 +52,10 @@ bool EPollEngine::AddFd(EventHandler* eh) return false; } if (ref[fd]) + { + ServerInstance->Log(DEFAULT,"Slot %d already occupied",fd); return false; + } ref[fd] = eh; diff --git a/src/socketengine_kqueue.cpp b/src/socketengine_kqueue.cpp index 008de44ca..0792e7920 100644 --- a/src/socketengine_kqueue.cpp +++ b/src/socketengine_kqueue.cpp @@ -44,6 +44,9 @@ KQueueEngine::~KQueueEngine() bool KQueueEngine::AddFd(EventHandler* eh) { int fd = eh->GetFd(); + + ServerInstance->Log(DEFAULT,"KQueueEngine::AddFd(%d)",fd); + if ((fd < 0) || (fd > MAX_DESCRIPTORS)) { ServerInstance->Log(DEFAULT,"ERROR: FD of %d added above max of %d",fd,MAX_DESCRIPTORS); @@ -56,7 +59,10 @@ bool KQueueEngine::AddFd(EventHandler* eh) } if (ref[fd]) + { + ServerInstance->Log(DEFAULT,"ERROR: Slot already occupied"); return false; + } ref[fd] = eh; ServerInstance->Log(DEBUG,"Add socket %d",fd); -- cgit v1.2.3