summaryrefslogtreecommitdiffstats
path: root/src/modules/m_spanningtree/server.cpp
diff options
context:
space:
mode:
authorGravatar danieldg2010-02-15 03:02:39 +0000
committerGravatar danieldg2010-02-15 03:02:39 +0000
commitace6e82aa9ad64fb77c01272c553667360ffda4e (patch)
tree5e238cd92761c40e33fda02fe8418923e7a4d921 /src/modules/m_spanningtree/server.cpp
parentCall OnClose() before changing link state to DYING to clean up introduced ser... (diff)
downloadinspircd++-ace6e82aa9ad64fb77c01272c553667360ffda4e.tar.gz
inspircd++-ace6e82aa9ad64fb77c01272c553667360ffda4e.tar.bz2
inspircd++-ace6e82aa9ad64fb77c01272c553667360ffda4e.zip
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
Diffstat (limited to 'src/modules/m_spanningtree/server.cpp')
-rw-r--r--src/modules/m_spanningtree/server.cpp7
1 files changed, 7 insertions, 0 deletions
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<std::string> &params)
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;
}