diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-12 13:03:41 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-12 13:03:41 +0000 |
commit | 6ae77db3109082e35a364fc1cc79e8c0ca0d731e (patch) | |
tree | a152da7310f0d5b71d4dee9ddc4dbdf114720d76 /src | |
parent | b5254e92e0690da29c1886e4afc1f16cd0f6428f (diff) |
Added checking to find out why select() splits
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2335 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/socketengine.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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<int> &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<int> &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 |