From 7b1c15618bcb53e33bfd137a552e866642b684da Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 2 Jun 2005 22:53:48 +0000 Subject: More tweaks git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1595 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 1f45965fb..418b58c5e 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -1790,6 +1790,7 @@ void DoSplitEveryone() } } has_been_netsplit = true; + log(DEBUG,"Clients removed."); } @@ -2387,6 +2388,7 @@ void DoSplit(const char* params) } } has_been_netsplit = true; + log(DEBUG,"Removed clients (DoSplit)"); } // removes a server. Will NOT remove its users! @@ -2994,9 +2996,15 @@ int InspIRCd(char** argv, int argc) me[x]->FlushWriteBuffers(); sums.clear(); msgs.clear(); - while ((me[x]) && (me[x]->RecvPacket(msgs, tcp_host, sums))) // returns 0 or more lines (can be multiple lines!) + if (me[x]) + has_been_netsplit = false; + while (me[x]->RecvPacket(msgs, tcp_host, sums)) // returns 0 or more lines (can be multiple lines!) { - has_been_netsplit = false; + if (has_been_netsplit) + { + log("Netsplit detected in recvpacket, aborting"); + goto label; + } for (unsigned int ctr = 0; ctr < msgs.size(); ctr++) { strlcpy(tcp_msg,msgs[ctr].c_str(),MAXBUF); -- cgit v1.2.3