]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
sanity check for existing server in DoFailOver seems to have vanished!
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 9 Oct 2007 15:57:43 +0000 (15:57 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 9 Oct 2007 15:57:43 +0000 (15:57 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8138 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree/utils.cpp

index 6385b7a124d0b72a697a554c212ce465aac10f40..abc251ab09844ebb65242c9aa0150713565d68e2 100644 (file)
@@ -645,8 +645,16 @@ void SpanningTreeUtilities::DoFailOver(Link* x)
                Link* TryThisOne = this->FindLink(x->FailOver.c_str());
                if (TryThisOne)
                {
-                       Creator->RemoteMessage(NULL,"FAILOVER: Trying failover link for \002%s\002: \002%s\002...", x->Name.c_str(), TryThisOne->Name.c_str());
-                       Creator->ConnectServer(TryThisOne);
+                       TreeServer* CheckDupe = this->FindServer(x->FailOver.c_str());
+                       if (CheckDupe)
+                       {
+                               ServerInstance->Log(DEBUG,"Skipping existing failover: %s", x->FailOver.c_str());
+                       }
+                       else
+                       {
+                               Creator->RemoteMessage(NULL,"FAILOVER: Trying failover link for \002%s\002: \002%s\002...", x->Name.c_str(), TryThisOne->Name.c_str());
+                               Creator->ConnectServer(TryThisOne);
+                       }
                }
                else
                {