From 8b69a6bed1820588a2d0f8a2369e6664cd0d4f38 Mon Sep 17 00:00:00 2001 From: dz Date: Sun, 25 Jan 2009 03:59:36 +0000 Subject: 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 --- src/modules/extra/m_ssl_gnutls.cpp | 4 ++-- src/modules/extra/m_ssl_openssl.cpp | 2 +- 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()) -- cgit v1.2.3