From 6a76bdb0117436af78b2f1137137770793c75436 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 5 Jul 2014 13:17:01 +0200 Subject: m_spanningtree Fix fake direction detection for commands --- src/modules/m_spanningtree/treesocket2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 882596b81..d16e55702 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -284,8 +284,8 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, * a valid SID or a valid UUID, so that invalid UUID or SID never makes it * to the higher level functions. -- B */ - TreeServer* route_back_again = TreeServer::Get(who)->GetRoute(); - if (route_back_again->GetSocket() != this) + TreeServer* const server = TreeServer::Get(who); + if (server->GetSocket() != this) { ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Protocol violation: Fake direction '%s' from connection '%s'", prefix.c_str(), linkID.c_str()); return; @@ -340,7 +340,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, } if (res == CMD_SUCCESS) - Utils->RouteCommand(route_back_again, cmdbase, params, who); + Utils->RouteCommand(server->GetRoute(), cmdbase, params, who); } void TreeSocket::OnTimeout() -- cgit v1.2.3