diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-11 18:38:00 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-11 18:38:00 +0000 |
commit | bfcaef8623bb3f8faf1141eb7b3805ab75ae97dd (patch) | |
tree | f26d108a63a8d311c64b400e58d5d1b7eff39bec /src/modules/extra/m_ssl_gnutls.cpp | |
parent | b469531385d6d65b2f9dface80fe1ab4b9e19e15 (diff) |
Refactor port binding, warning not yet tested fully
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6982 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_ssl_gnutls.cpp')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 13 |
1 files changed, 6 insertions, 7 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"); } } } |