]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket1.cpp
Allow support for multiple dns results per request. This is a significant change...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket1.cpp
index 4d960cf8a55ad9c8fce6ca91c7ae0abfe8e29aa5..c939f2349b90469731032106011090a35fd78b07 100644 (file)
@@ -212,6 +212,9 @@ void TreeSocket::OnError(InspSocketError e)
 {
        Link* MyLink;
 
+       if (this->LinkState == LISTENER)
+               return;
+
        switch (e)
        {
                case I_ERR_CONNECT:
@@ -411,7 +414,7 @@ void TreeSocket::SendError(const std::string &errormessage)
 {
        /* Display the error locally as well as sending it remotely */
        this->WriteLine("ERROR :"+errormessage);
-       this->Instance->SNO->WriteToSnoMask('l',"Sent \2ERROR\2 to "+this->InboundServerName+": "+errormessage);
+       this->Instance->SNO->WriteToSnoMask('l',"Sent \2ERROR\2 to "+ (this->InboundServerName.empty() ? "<unknown>" : this->InboundServerName) +": "+errormessage);
        /* One last attempt to make sure the error reaches its target */
        this->FlushWriteBuffer();
 }