aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_spanningtree/handshaketimer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree/handshaketimer.cpp')
-rw-r--r--src/modules/m_spanningtree/handshaketimer.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/modules/m_spanningtree/handshaketimer.cpp b/src/modules/m_spanningtree/handshaketimer.cpp
index 32364e278..57a7eeced 100644
--- a/src/modules/m_spanningtree/handshaketimer.cpp
+++ b/src/modules/m_spanningtree/handshaketimer.cpp
@@ -41,18 +41,25 @@ void HandshakeTimer::Tick(time_t TIME)
{
if (Instance->SE->GetRef(thefd) == sock)
{
- if (sock->GetHook() && InspSocketHSCompleteRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send())
+ if (!sock->GetHook())
{
- InspSocketAttachCertRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send();
sock->SendCapabilities();
if (sock->GetLinkState() == CONNECTING)
- {
sock->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+lnk->SendPass+" 0 :"+this->Instance->Config->ServerDesc);
- }
}
else
{
- Instance->Timers->AddTimer(new HandshakeTimer(Instance, sock, lnk, Utils));
+ if (sock->GetHook() && InspSocketHSCompleteRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send())
+ {
+ InspSocketAttachCertRequest(sock, (Module*)Utils->Creator, sock->GetHook()).Send();
+ sock->SendCapabilities();
+ if (sock->GetLinkState() == CONNECTING)
+ sock->WriteLine(std::string("SERVER ")+this->Instance->Config->ServerName+" "+lnk->SendPass+" 0 :"+this->Instance->Config->ServerDesc);
+ }
+ else
+ {
+ Instance->Timers->AddTimer(new HandshakeTimer(Instance, sock, lnk, Utils));
+ }
}
}
}