summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-01 00:25:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-01 00:25:26 +0000
commit8fe441db7cfddb90bc6fca2e33dfffd2ae68dca7 (patch)
tree8ebcae47985c87f015b54bd62f428b339ec83fd0 /src
parentba339f8b1c55dd32211e8cffbc5bea02371d7668 (diff)
Fix this so it works properly, and removes the descriptions on unload (when the sockets revert back to plaintext)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6197 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp7
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp7
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");
+ }
}
}