From 6ae77db3109082e35a364fc1cc79e8c0ca0d731e Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 12 Dec 2005 13:03:41 +0000 Subject: Added checking to find out why select() splits git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2335 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengine.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/socketengine.cpp') diff --git a/src/socketengine.cpp b/src/socketengine.cpp index f4f149eed..1ebd0b633 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -53,7 +53,11 @@ bool SocketEngine::AddFd(int fd, bool readable, char type) this->fds.push_back(fd); ref[fd] = type; if (readable) + { + log(DEBUG,"Set readbit"); ref[fd] |= X_READBIT; + } + log(DEBUG,"Add socket %d",fd); #ifdef USE_EPOLL struct epoll_event ev; log(DEBUG,"epoll: Add socket to events, ep=%d socket=%d",EngineHandle,fd); @@ -93,6 +97,7 @@ bool SocketEngine::DelFd(int fd) if (*i == fd) { fds.erase(i); + log(DEBUG,"Deleted fd %d",fd); found = true; break; } @@ -134,10 +139,12 @@ bool SocketEngine::Wait(std::vector &fdlist) { if (ref[fds[a]] & X_READBIT) { + log(DEBUG,"Adding readable %d",fds[a]); FD_SET (fds[a], &rfdset); } else { + log(DEBUG,"Adding writeable %d",fds[a]); FD_SET (fds[a], &wfdset); } @@ -150,7 +157,10 @@ bool SocketEngine::Wait(std::vector &fdlist) for (unsigned int a = 0; a < fds.size(); a++) { if ((FD_ISSET (fds[a], &rfdset)) || (FD_ISSET (fds[a], &wfdset))) + { + log(DEBUG,"...Adding active %d",fds[a]); fdlist.push_back(fds[a]); + } } } #endif -- cgit v1.2.3