diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-26 22:01:28 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-26 22:01:28 +0000 |
commit | 9f10cc2542fda6ef56301f76340621fd3cbcd81b (patch) | |
tree | 6bc0eea8ebdecea8664ebdf1a80c5ed3927db9ab /src | |
parent | d336a2499746765fcea81164db1a6a21b1b5384d (diff) |
Fixed compile glitches
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1961 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 16 |
1 files 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); } |