diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-05 14:40:16 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-05 14:40:16 +0000 |
commit | 82ce717cd28878019efd2303aab1ea7e3ae98e16 (patch) | |
tree | 527dfe4aca50c9101ecb5f59331819dfeb87d8e3 /src | |
parent | 1e2e45fdc36eb6968f7551f5ace59169bc569511 (diff) |
Fix to trigger the write notification on successful writes, too
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7662 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 1f5a71b10..0dfc9dd29 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -589,12 +589,13 @@ class ModuleSSLOpenSSL : public Module } else if (ret < 0) { + MakePollWrite(session); + int err = SSL_get_error(session->sess, ret); if (err == SSL_ERROR_WANT_WRITE) { session->wstat = ISSL_WRITE; - MakePollWrite(session); return -1; } else if (err == SSL_ERROR_WANT_READ) @@ -611,6 +612,7 @@ class ModuleSSLOpenSSL : public Module else { session->outbuf = session->outbuf.substr(ret); + MakePollWrite(session); return ret; } } @@ -798,14 +800,14 @@ class ModuleSSLOpenSSL : public Module ServerInstance->SE->WantWrite(eh); } -virtual void OnBufferFlushed(userrec* user) -{ - if (user->GetExt("ssl")) + virtual void OnBufferFlushed(userrec* user) { - ServerInstance->Log(DEBUG,"OnBufferFlushed for ssl user"); - issl_session* session = &sessions[user->GetFd()]; - if (session && session->outbuf.size()) - OnRawSocketWrite(user->GetFd(), NULL, 0); + if (user->GetExt("ssl")) + { + ServerInstance->Log(DEBUG,"OnBufferFlushed for ssl user"); + issl_session* session = &sessions[user->GetFd()]; + if (session && session->outbuf.size()) + OnRawSocketWrite(user->GetFd(), NULL, 0); } } |