summaryrefslogtreecommitdiff
path: root/src/servers.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-24 17:10:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-24 17:10:19 +0000
commit9067d816e5797676004ae50babb262dc4ca702e1 (patch)
tree6ef409d1b199ee7c25fa6a675f4f46761e7eb243 /src/servers.cpp
parenta0f17e57ccc1d6f7923da8eb6ba8e55d1ea61301 (diff)
Added extra code to notify mainloop when the iterator has been mangled (e.g. by netsplit quits)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1499 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/servers.cpp')
-rw-r--r--src/servers.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/servers.cpp b/src/servers.cpp
index ff5f40a68..a791d3557 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -36,8 +36,11 @@ using namespace std;
extern time_t TIME;
extern int MaxConn;
+
extern serverrec* me[32];
+extern bool has_been_netsplit;
+
std::deque<std::string> xsums;
serverrec::serverrec()
@@ -308,6 +311,7 @@ void serverrec::FlushWriteBuffers()
WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
DoSplit(this->connectors[i].GetServerName().c_str());
}
+ has_been_netsplit = true;
}
}
if (this->connectors[i].HasBufferedOutput())
@@ -323,6 +327,7 @@ void serverrec::FlushWriteBuffers()
WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
DoSplit(this->connectors[i].GetServerName().c_str());
}
+ has_been_netsplit = true;
}
}
}
@@ -457,6 +462,7 @@ bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std
WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
DoSplit(this->connectors[i].GetServerName().c_str());
}
+ has_been_netsplit = true;
}
}
int pushed = 0;
@@ -472,6 +478,7 @@ bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std
WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
DoSplit(this->connectors[i].GetServerName().c_str());
}
+ has_been_netsplit = true;
}
if (this->connectors[i].BufferIsComplete())
{