X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Ftreesocket1.cpp;h=370c38d2c41a222f5a8728cf49dd70e2ecc61b87;hb=1e96bca9b075aebec490e6892ef2da2a3048ba12;hp=e1642a086041bb54bb9b0eb9d1e62c8287f40864;hpb=b9e11915a976daaf790ebc763aff56e19fd49e0f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index e1642a086..370c38d2c 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -37,7 +37,7 @@ * and only do minor initialization tasks ourselves. */ TreeSocket::TreeSocket(Link* link, Autoconnect* myac, const std::string& ipaddr) - : linkID(assign(link->Name)), LinkState(CONNECTING), MyRoot(NULL), proto_version(0) + : linkID(link->Name), LinkState(CONNECTING), MyRoot(NULL), proto_version(0) , burstsent(false), age(ServerInstance->Time()) { capab = new CapabData; @@ -63,8 +63,16 @@ TreeSocket::TreeSocket(int newfd, ListenSocket* via, irc::sockets::sockaddrs* cl for (ListenSocket::IOHookProvList::iterator i = via->iohookprovs.begin(); i != via->iohookprovs.end(); ++i) { ListenSocket::IOHookProvRef& iohookprovref = *i; - if (iohookprovref) - iohookprovref->OnAccept(this, client, server); + if (!iohookprovref) + continue; + + iohookprovref->OnAccept(this, client, server); + // IOHook could have encountered a fatal error, e.g. if the TLS ClientHello was already in the queue and there was no common TLS version + if (!getError().empty()) + { + TreeSocket::OnError(I_ERR_OTHER); + return; + } } SendCapabilities(1);