summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-11 18:18:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-11 18:18:06 +0000
commit949712aebaffd70e18bbaf45132bd73313becc6d (patch)
tree2bb6314c5e6374d67ccc2df475e755aa0617f034 /src
parentaeecb1b83834c91246ab75f4fb98c0e9ed16081a (diff)
Checks and stuff :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3671 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp2
-rw-r--r--src/socket.cpp7
-rw-r--r--src/userprocess.cpp2
3 files changed, 9 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index a7ce18f4a..06a52ed08 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -702,7 +702,7 @@ void InspIRCd::DoOneIteration(bool process_module_sockets)
if ((s) && (!s->Poll()))
{
- log(DEBUG,"Socket poll returned false, close and bail");
+ log(DEBUG,"inspircd.cpp: Socket poll returned false, close and bail");
SE->DelFd(s->GetFd());
socket_ref[activefds[activefd]] = NULL;
for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
diff --git a/src/socket.cpp b/src/socket.cpp
index a8fdd30b9..a1f322b50 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -244,6 +244,7 @@ char* InspSocket::Read()
void InspSocket::MarkAsClosed()
{
+ log(DEBUG,"Marked as closed");
this->ClosePending = true;
}
@@ -295,10 +296,16 @@ bool InspSocket::FlushWriteBuffer()
bool InspSocket::Timeout(time_t current)
{
if (!socket_ref[this->fd] || !ServerInstance->SE->HasFd(this->fd))
+ {
+ log(DEBUG,"No FD or socket ref");
return false;
+ }
if (this->ClosePending)
+ {
+ log(DEBUG,"Close is pending");
return true;
+ }
if (((this->state == I_RESOLVING) || (this->state == I_CONNECTING)) && (current > timeout_end))
{
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 182cd2eb5..7dc169108 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -319,7 +319,7 @@ void DoSocketTimeouts(time_t TIME)
InspSocket* s = (InspSocket*)*a;
if (s->Timeout(TIME))
{
- log(DEBUG,"Socket poll returned false, close and bail");
+ log(DEBUG,"userprocess.cpp: Socket poll returned false, close and bail");
SE->DelFd(s->GetFd());
socket_ref[s->GetFd()] = NULL;
s->Close();