aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/treesocket2.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-04-10 17:05:13 +0200
committerGravatar attilamolnar2013-04-10 17:05:13 +0200
commit65072d44f23804d85dd800c5ce6aa3548831142e (patch)
tree9e7b361f2a949d00a8f8f5111e6d4af1cee7a030 /src/modules/m_spanningtree/treesocket2.cpp
parentRemove some uline checks that ran after an IS_LOCAL() check (diff)
m_spanningtree Create new TreeServers for incoming connections only when they've accepted our credentials, not when they send SERVER
Diffstat (limited to 'src/modules/m_spanningtree/treesocket2.cpp')
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 04ca9edb1..5007fe921 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -164,9 +164,21 @@ void TreeSocket::ProcessLine(std::string &line)
ServerInstance->SNO->WriteGlobalSno('l',"\2WARNING\2: Your clocks are out by %d seconds. Please consider synching your clocks.", abs((long)delta));
}
}
+
+ // Check for duplicate server name/sid again, it's possible that a new
+ // server was introduced while we were waiting for them to send BURST.
+ // (we do not reserve their server name/sid when they send SERVER, we do it now)
+ if (!CheckDuplicate(capab->name, capab->sid))
+ return;
+
this->LinkState = CONNECTED;
Utils->timeoutlist.erase(this);
+ linkID = capab->name;
+
+ MyRoot = new TreeServer(Utils, capab->name, capab->description, capab->sid, Utils->TreeRoot, this, capab->hidden);
+ Utils->TreeRoot->AddChild(MyRoot);
+
MyRoot->bursting = true;
this->DoBurst(MyRoot);