]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_spanningtree Remove now needless TreeSocket::ConnectionFailureShown
authorAttila Molnar <attilamolnar@hush.com>
Mon, 28 Jul 2014 12:23:02 +0000 (14:23 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Mon, 28 Jul 2014 12:23:02 +0000 (14:23 +0200)
src/modules/m_spanningtree/treesocket.h
src/modules/m_spanningtree/treesocket1.cpp
src/modules/m_spanningtree/treesocket2.cpp

index f168085192c3f663fb2cba2efc90192dc51cbadf..274337d3fef7d359c225ec93bc45fc5ece13dfa8 100644 (file)
@@ -98,7 +98,6 @@ class TreeSocket : public BufferedSocket
        time_t NextPing;                        /* Time when we are due to ping this server */
        bool LastPingWasGood;                   /* Responded to last ping we sent? */
        int proto_version;                      /* Remote protocol version */
-       bool ConnectionFailureShown; /* Set to true if a connection failure message was shown */
 
        /** True if we've sent our burst.
         * This only changes the behavior of message translation for 1202 protocol servers and it can be
index 97c83bbfbca1562a07eded1026f03bfe59ad052f..5deef8394b8c8091d8078dfb83cf23686c86b95f 100644 (file)
@@ -37,7 +37,7 @@
  * to it.
  */
 TreeSocket::TreeSocket(Link* link, Autoconnect* myac, const std::string& ipaddr)
-       : linkID(assign(link->Name)), LinkState(CONNECTING), MyRoot(NULL), proto_version(0), ConnectionFailureShown(false)
+       : linkID(assign(link->Name)), LinkState(CONNECTING), MyRoot(NULL), proto_version(0)
        , burstsent(false), age(ServerInstance->Time())
 {
        capab = new CapabData;
@@ -57,7 +57,7 @@ TreeSocket::TreeSocket(Link* link, Autoconnect* myac, const std::string& ipaddr)
 TreeSocket::TreeSocket(int newfd, ListenSocket* via, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server)
        : BufferedSocket(newfd)
        , linkID("inbound from " + client->addr()), LinkState(WAIT_AUTH_1), MyRoot(NULL), proto_version(0)
-       , ConnectionFailureShown(false), burstsent(false), age(ServerInstance->Time())
+       , burstsent(false), age(ServerInstance->Time())
 {
        capab = new CapabData;
        capab->capab_phase = 0;
index 7e26a325e8b053abcd65ebd16d90840126222a81..574dda09d0608233f52865a826b1b91f760ebfee 100644 (file)
@@ -357,17 +357,13 @@ void TreeSocket::Close()
        if (MyRoot)
                Squit(MyRoot,getError());
 
-       if (!ConnectionFailureShown)
-       {
-               ConnectionFailureShown = true;
-               ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\2%s\2' failed.",linkID.c_str());
+       ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\2%s\2' failed.",linkID.c_str());
 
-               time_t server_uptime = ServerInstance->Time() - this->age;
-               if (server_uptime)
-               {
-                       std::string timestr = ModuleSpanningTree::TimeToStr(server_uptime);
-                       ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\2%s\2' was established for %s", linkID.c_str(), timestr.c_str());
-               }
+       time_t server_uptime = ServerInstance->Time() - this->age;
+       if (server_uptime)
+       {
+               std::string timestr = ModuleSpanningTree::TimeToStr(server_uptime);
+               ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\2%s\2' was established for %s", linkID.c_str(), timestr.c_str());
        }
 }