diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-22 18:38:38 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-22 18:38:38 +0000 |
commit | 3c68d83766d0eea30ed70888e537a1deb4c309ff (patch) | |
tree | 57d1245be32c4ec7842cd117f5e46a2fd2dd0bdb /src/modules | |
parent | e063722fa20266f82e350704211571e27a11b314 (diff) |
More checks in IS_HSDONE event hook
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6695 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 3 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 964e488d1..c9a421e39 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -309,6 +309,9 @@ class ModuleSSLGnuTLS : public Module } else if (strcmp("IS_HSDONE", request->GetId()) == 0) { + if (ISR->Sock->GetFd() < 0) + return (char*)"OK"; + issl_session* session = &sessions[ISR->Sock->GetFd()]; return (session->status == ISSL_HANDSHAKING_READ || session->status == ISSL_HANDSHAKING_WRITE) ? NULL : (char*)"OK"; } diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 7ed29ec37..6e2b713f9 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -359,6 +359,9 @@ class ModuleSSLOpenSSL : public Module } else if (strcmp("IS_HSDONE", request->GetId()) == 0) { + if (ISR->Sock->GetFd() < 0) + return (char*)"OK"; + issl_session* session = &sessions[ISR->Sock->GetFd()]; return (session->status == ISSL_HANDSHAKING) ? NULL : (char*)"OK"; } |