From: dz Date: Sun, 25 Jan 2009 03:59:36 +0000 (+0000) Subject: Properly check if the SSL handshake is completed in m_ssl_gnutls, fixes the recent... X-Git-Tag: v2.0.23~2170 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=8b69a6bed1820588a2d0f8a2369e6664cd0d4f38;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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())