diff options
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 7 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index e5c316035..fbd809742 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -141,7 +141,7 @@ class ModuleSSLGnuTLS : public Module { listenports.push_back(portno); for (unsigned int i = 0; i < ServerInstance->stats->BoundPortCount; i++) - if (ServerInstance->Config->ports[i]) + if (ServerInstance->Config->ports[i] == portno) ServerInstance->Config->openSockfd[i]->SetDescription("ssl"); ServerInstance->Log(DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %d", portno); } @@ -259,7 +259,12 @@ class ModuleSSLGnuTLS : public Module ServerInstance->Log(DEBUG, "m_ssl_gnutls.so: Killed %d users for unload of GnuTLS SSL module", numusers); 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]) + ServerInstance->Config->openSockfd[j]->SetDescription("plaintext"); + } } } diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index c5b6d1c62..ca690fb8f 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -165,7 +165,7 @@ class ModuleSSLOpenSSL : public Module { listenports.push_back(portno); for (unsigned int i = 0; i < ServerInstance->stats->BoundPortCount; i++) - if (ServerInstance->Config->ports[i]) + if (ServerInstance->Config->ports[i] == portno) ServerInstance->Config->openSockfd[i]->SetDescription("ssl"); ServerInstance->Log(DEFAULT, "m_ssl_openssl.so: Enabling SSL for port %d", portno); } @@ -293,7 +293,12 @@ class ModuleSSLOpenSSL : public Module ServerInstance->Log(DEBUG, "m_ssl_openssl.so: Killed %d users for unload of OpenSSL SSL module", numusers); 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]) + ServerInstance->Config->openSockfd[j]->SetDescription("plaintext"); + } } } |