From ace6e82aa9ad64fb77c01272c553667360ffda4e Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 15 Feb 2010 03:02:39 +0000 Subject: Fix race where two servers with the same name can enter WAIT_AUTH_2 and cause a double-free crash git-svn-id: http://svn.inspircd.org/repository/branches/1_2_stable@12461 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/server.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/modules/m_spanningtree/server.cpp') diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index fcf3bbfa0..c75298bad 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -264,6 +264,13 @@ bool TreeSocket::Inbound_Server(std::deque ¶ms) this->SendCapabilities(); this->WriteLine(std::string("SERVER ")+this->ServerInstance->Config->ServerName+" "+this->MakePass(x->SendPass, this->GetTheirChallenge())+" 0 "+ServerInstance->Config->GetSID()+" :"+this->ServerInstance->Config->ServerDesc); // move to the next state, we are now waiting for THEM. + + Link* lnk = Utils->FindLink(InboundServerName); + + TreeServer* Node = new TreeServer(this->Utils, this->ServerInstance, InboundServerName, InboundDescription, InboundSID, Utils->TreeRoot, this, lnk ? lnk->Hidden : false); + + Utils->TreeRoot->AddChild(Node); + Node->bursting = true; this->LinkState = WAIT_AUTH_2; return true; } -- cgit v1.3.1-10-gc9f91