summaryrefslogtreecommitdiff
path: root/src/modules/m_xmlsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_xmlsocket.cpp')
-rw-r--r--src/modules/m_xmlsocket.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/modules/m_xmlsocket.cpp b/src/modules/m_xmlsocket.cpp
index 09ffe6ca9..1cf9fafa2 100644
--- a/src/modules/m_xmlsocket.cpp
+++ b/src/modules/m_xmlsocket.cpp
@@ -62,9 +62,9 @@ class ModuleXMLSocket : public Module
if (ServerInstance->Config->AddIOHook(portno, this))
{
listenports.push_back(portno);
- for (unsigned int i = 0; i < ServerInstance->stats->BoundPortCount; i++)
- if (ServerInstance->Config->ports[i] == portno)
- ServerInstance->Config->openSockfd[i]->SetDescription("xml");
+ for (size_t i = 0; i < ServerInstance->Config->ports.size(); i++)
+ if (ServerInstance->Config->ports[i]->GetPort() == portno)
+ ServerInstance->Config->ports[i]->SetDescription("xml");
}
else
{
@@ -93,10 +93,9 @@ class ModuleXMLSocket : public Module
for(unsigned int i = 0; i < listenports.size(); i++)
{
ServerInstance->Config->DelIOHook(listenports[i]);
- for (unsigned int j = 0; j < ServerInstance->stats->BoundPortCount; j++)
- if (ServerInstance->Config->ports[j] == listenports[i])
- if (ServerInstance->Config->openSockfd[j])
- ServerInstance->Config->openSockfd[j]->SetDescription("plaintext");
+ for (size_t j = 0; j < ServerInstance->Config->ports.size(); j++)
+ if (ServerInstance->Config->ports[j]->GetPort() == listenports[i])
+ ServerInstance->Config->ports[j]->SetDescription("plaintext");
}
}
}