From 9f10cc2542fda6ef56301f76340621fd3cbcd81b Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 26 Nov 2005 22:01:28 +0000 Subject: [PATCH] Fixed compile glitches git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1961 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index b25e746a9..594379ccc 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -259,15 +259,15 @@ class ModuleSpanningTree : public Module for (int j =0; j < Conf->Enumerate("bind"); j++) { std::string TypeName = Conf->ReadValue("bind","type",j); - std::string IP = Conf->ReadValue("bind","address"); - long Port = Conf->ReadInteger("bind","port",true); + std::string IP = Conf->ReadValue("bind","address",j); + long Port = Conf->ReadInteger("bind","port",j,true); if (IP == "*") { IP = ""; } // TODO: Error check here for failed bindings TreeSocket* listener = new TreeSocket(IP.c_str(),Port,true,10); - if (listener->GetStatus() == I_LISTENING) + if (listener->GetState() == I_LISTENING) { Srv->AddSocket(listener); Bindings.push_back(listener); @@ -275,18 +275,20 @@ class ModuleSpanningTree : public Module else { log(DEFAULT,"m_spanningtree: Warning: Failed to bind server port %d",Port); + listener->Close(); + delete listener; } } } LinkBlocks.clear(); - for (j =0; j < Conf->Enumerate("link"); j++) + for (int j =0; j < Conf->Enumerate("link"); j++) { Link L; L.Name = Conf->ReadValue("link","name",j); L.IPAddr = Conf->ReadValue("link","ipaddr",j); - L.Port = Conf->ReadInteger("link","port",true); - L.SendPass = Conf->ReadValue("link","sendpass"); - L.RecvPass = Conf->ReadValue("link","recvpass"); + L.Port = Conf->ReadInteger("link","port",j,true); + L.SendPass = Conf->ReadValue("link","sendpass",j); + L.RecvPass = Conf->ReadValue("link","recvpass",j); LinkBlocks.push_back(L); log(DEBUG,"m_spanningtree: Read server %s with host %s:%d",L.Name.c_str(),L.IPAddr.c_str(),L.Port); } -- 2.39.5