diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-12 22:30:27 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-12 22:30:27 +0000 |
commit | 69e28c67dddd8b74ee4c321667d286111e09e5da (patch) | |
tree | b5de7bc4ab8abfc93b1adc0721f62ba5d54e5760 /src/modules/extra | |
parent | 39cf323606a311b3b7f59a9c9f39a21d42520c24 (diff) |
Remove possible references to deleted User objects due to DNS lookups
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12445 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 10 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index c2dc4c878..243c8e28e 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -572,13 +572,13 @@ class ModuleSSLGnuTLS : public Module { if (user->eh.GetIOHook() == this) { - if (sessions[user->GetFd()].sess) + if (sessions[user->eh.GetFd()].sess) { - ssl_cert* cert = sessions[user->GetFd()].cert; + ssl_cert* cert = sessions[user->eh.GetFd()].cert; SSLCertSubmission(user, this, ServerInstance->Modules->Find("m_sslinfo.so"), cert); - std::string cipher = gnutls_kx_get_name(gnutls_kx_get(sessions[user->GetFd()].sess)); - cipher.append("-").append(gnutls_cipher_get_name(gnutls_cipher_get(sessions[user->GetFd()].sess))).append("-"); - cipher.append(gnutls_mac_get_name(gnutls_mac_get(sessions[user->GetFd()].sess))); + std::string cipher = gnutls_kx_get_name(gnutls_kx_get(sessions[user->eh.GetFd()].sess)); + cipher.append("-").append(gnutls_cipher_get_name(gnutls_cipher_get(sessions[user->eh.GetFd()].sess))).append("-"); + cipher.append(gnutls_mac_get_name(gnutls_mac_get(sessions[user->eh.GetFd()].sess))); if (cert->fingerprint.empty()) user->WriteServ("NOTICE %s :*** You are connected using SSL cipher \"%s\"", user->nick.c_str(), cipher.c_str()); else diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 018d7351e..7d46cf66a 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -240,13 +240,13 @@ class ModuleSSLOpenSSL : public Module { if (user->eh.GetIOHook() == this) { - if (sessions[user->GetFd()].sess) + if (sessions[user->eh.GetFd()].sess) { - SSLCertSubmission(user, this, ServerInstance->Modules->Find("m_sslinfo.so"), sessions[user->GetFd()].cert); + SSLCertSubmission(user, this, ServerInstance->Modules->Find("m_sslinfo.so"), sessions[user->eh.GetFd()].cert); - if (!sessions[user->GetFd()].cert->fingerprint.empty()) + if (!sessions[user->eh.GetFd()].cert->fingerprint.empty()) user->WriteServ("NOTICE %s :*** You are connected using SSL fingerprint %s", - user->nick.c_str(), sessions[user->GetFd()].cert->fingerprint.c_str()); + user->nick.c_str(), sessions[user->eh.GetFd()].cert->fingerprint.c_str()); } } } |