diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-03 23:31:55 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-03 23:31:55 +0000 |
commit | 32ae5cb126d132679ca8df142a9778f6e6eaf9e2 (patch) | |
tree | 18813f92605f27037a0d01f37b99571227a4ea64 /src | |
parent | 09ffbb0339765d183b48fee9131c78b49e7bed87 (diff) |
Test fixes for cpu eating issue
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3809 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 73b27dbe8..6dca11fda 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -679,6 +679,8 @@ void InspIRCd::DoOneIteration(bool process_module_sockets) * listening ports or module sockets though, things could get * ugly. */ + log(DEBUG,"There are %d fd's to process.",numberactive); + for (unsigned int activefd = 0; activefd < numberactive; activefd++) { int socket_type = SE->GetType(activefds[activefd]); @@ -686,6 +688,7 @@ void InspIRCd::DoOneIteration(bool process_module_sockets) { case X_ESTAB_CLIENT: + log(DEBUG,"Type: X_ESTAB_CLIENT: fd=%d",activefds[activefd]); cu = fd_ref_table[activefds[activefd]]; if (cu) ProcessUser(cu); @@ -694,6 +697,8 @@ void InspIRCd::DoOneIteration(bool process_module_sockets) case X_ESTAB_MODULE: + log(DEBUG,"Type: X_ESTAB_MODULE: fd=%d",activefds[activefd]); + if (!process_module_sockets) break; @@ -720,6 +725,11 @@ void InspIRCd::DoOneIteration(bool process_module_sockets) s->Close(); delete s; } + else if (!s) + { + log(DEBUG,"WTF, X_ESTAB_MODULE for nonexistent InspSocket, removed!"); + SE->DelFd(s->GetFd()); + } break; case X_ESTAB_DNS: @@ -731,12 +741,15 @@ void InspIRCd::DoOneIteration(bool process_module_sockets) * and independent of the mainloop. */ #ifndef THREADED_DNS + log(DEBUG,"Type: X_ESTAB_DNS: fd=%d",activefds[activefd]); dns_poll(activefds[activefd]); #endif break; case X_LISTEN: + log(DEBUG,"Type: X_LISTEN_MODULE: fd=%d",activefds[activefd]); + /* It's a listener */ uslen = sizeof(sock_us); length = sizeof(client); @@ -781,6 +794,7 @@ void InspIRCd::DoOneIteration(bool process_module_sockets) * what we would do, so for now, its going * to safely do bugger all. */ + log(DEBUG,"Type: X_WHAT_THE_FUCK_BBQ: fd=%d",activefds[activefd]); SE->DelFd(activefds[activefd]); break; } |