summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordz <dz@e03df62e-2008-0410-955e-edbf42e46eb7>2009-01-25 03:59:36 +0000
committerdz <dz@e03df62e-2008-0410-955e-edbf42e46eb7>2009-01-25 03:59:36 +0000
commit8b69a6bed1820588a2d0f8a2369e6664cd0d4f38 (patch)
treef9f46dc6de70a1fccd2d8d03062248946fd64a7a
parente6a079abdf360588f6a2b38ecc8f899cc7b7da2d (diff)
Properly check if the SSL handshake is completed in m_ssl_gnutls, fixes the recent issue where connections would hang with nothing recieved on either end until registration timeout. Also reverts r10998.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11000 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp4
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 9a1f88cce..151d10fd4 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -599,7 +599,7 @@ class ModuleSSLGnuTLS : public Module
sendbuffer = session->outbuf.c_str();
count = session->outbuf.size();
- if (session->status == ISSL_HANDSHAKING_WRITE)
+ if (session->status == ISSL_HANDSHAKING_WRITE || session->status == ISSL_HANDSHAKING_READ)
{
// The handshake isn't finished, try to finish it.
Handshake(session);
@@ -772,7 +772,7 @@ class ModuleSSLGnuTLS : public Module
virtual void OnBufferFlushed(User* user)
{
- if (user->GetIOHook() == this && user->GetExt("ssl"))
+ if (user->GetIOHook() == this)
{
issl_session* session = &sessions[user->GetFd()];
if (session && session->outbuf.size())
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 8243b4f0a..4beefae10 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -798,7 +798,7 @@ class ModuleSSLOpenSSL : public Module
virtual void OnBufferFlushed(User* user)
{
- if (user->GetIOHook() == this && user->GetExt("ssl"))
+ if (user->GetIOHook() == this)
{
issl_session* session = &sessions[user->GetFd()];
if (session && session->outbuf.size())