summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp13
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp13
-rw-r--r--src/modules/m_xmlsocket.cpp13
3 files changed, 18 insertions, 21 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 0e923df41..5d95e75cf 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -140,9 +140,9 @@ class ModuleSSLGnuTLS : 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("ssl");
+ for (size_t i = 0; i < ServerInstance->Config->ports.size(); i++)
+ if (ServerInstance->Config->ports[i]->GetPort() == portno)
+ ServerInstance->Config->ports[i]->SetDescription("ssl");
ServerInstance->Log(DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %d", portno);
}
else
@@ -264,10 +264,9 @@ class ModuleSSLGnuTLS : 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");
}
}
}
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 53c595365..e073eba81 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -178,9 +178,9 @@ class ModuleSSLOpenSSL : 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("ssl");
+ for (size_t i = 0; i < ServerInstance->Config->ports.size(); i++)
+ if (ServerInstance->Config->ports[i]->GetPort() == portno)
+ ServerInstance->Config->ports[i]->SetDescription("ssl");
ServerInstance->Log(DEFAULT, "m_ssl_openssl.so: Enabling SSL for port %d", portno);
}
else
@@ -314,10 +314,9 @@ class ModuleSSLOpenSSL : 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");
}
}
}
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");
}
}
}