diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-05 17:17:33 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-05 17:17:33 +0000 |
commit | 28dd5f0e51f6ce826acaa6a64fc9a3dc04e6efb5 (patch) | |
tree | 8417cd29bbfbf44c178aaf6b4ba7e64754d2672f | |
parent | 3b548c7e7279bcbf325c166da67e66384a26215f (diff) |
Fixed freeing of bound sockets when unloading spanningtree
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5422 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 0a04708e1..176b1c240 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -3735,9 +3735,10 @@ void ReadConfiguration(bool rebind) { std::string Type = Conf->ReadValue("bind","type",j); std::string IP = Conf->ReadValue("bind","address",j); - long Port = Conf->ReadInteger("bind","port",j,true); + int Port = Conf->ReadInteger("bind","port",j,true); if (Type == "servers") { + ServerInstance->Log(DEBUG,"m_spanningtree: Binding server port %s:%d", IP.c_str(), Port); if (IP == "*") { IP = ""; @@ -3745,6 +3746,7 @@ void ReadConfiguration(bool rebind) TreeSocket* listener = new TreeSocket(ServerInstance, IP.c_str(),Port,true,10); if (listener->GetState() == I_LISTENING) { + ServerInstance->Log(DEFAULT,"m_spanningtree: Binding server port %s:%d successful!", IP.c_str(), Port); Bindings.push_back(listener); } else @@ -3753,6 +3755,7 @@ void ReadConfiguration(bool rebind) listener->Close(); DELETE(listener); } + ServerInstance->Log(DEBUG,"Done with this binding"); } } } @@ -3838,7 +3841,6 @@ void ReadConfiguration(bool rebind) class ModuleSpanningTree : public Module { - std::vector<TreeSocket*> Bindings; int line; int NumServers; unsigned int max_local; @@ -4998,7 +5000,7 @@ class ModuleSpanningTree : public Module virtual ~ModuleSpanningTree() { ServerInstance->Log(DEBUG,"Performing unload of spanningtree!"); - ServerInstance->Log(DEBUG,"Freeing bindings..."); + ServerInstance->Log(DEBUG,"Freeing %d bindings...",Bindings.size()); for (unsigned int i = 0; i < Bindings.size(); i++) { ServerInstance->Log(DEBUG,"Freeing binding %d of %d",i, Bindings.size()); |