diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-02-08 23:01:44 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-02-08 23:01:44 +0100 |
commit | efe77ba63b1e519fc4d563bd9b599277c4bd96e5 (patch) | |
tree | 85eff52bd7735d19f3bac254ad9cce1fb863de43 /src/modules/extra/m_ssl_gnutls.cpp | |
parent | 689996cb8856af43a033eb5ca1cb9df7475c0854 (diff) |
Change all socketengine methods to be static
Diffstat (limited to 'src/modules/extra/m_ssl_gnutls.cpp')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 50ad4af81..53ed59816 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -588,13 +588,13 @@ class GnuTLSIOHook : public SSLIOHook { // gnutls_handshake() wants to read() again. this->status = ISSL_HANDSHAKING_READ; - ServerInstance->SE->ChangeEventMask(user, FD_WANT_POLL_READ | FD_WANT_NO_WRITE); + SocketEngine::ChangeEventMask(user, FD_WANT_POLL_READ | FD_WANT_NO_WRITE); } else { // gnutls_handshake() wants to write() again. this->status = ISSL_HANDSHAKING_WRITE; - ServerInstance->SE->ChangeEventMask(user, FD_WANT_NO_READ | FD_WANT_SINGLE_WRITE); + SocketEngine::ChangeEventMask(user, FD_WANT_NO_READ | FD_WANT_SINGLE_WRITE); } } else @@ -614,7 +614,7 @@ class GnuTLSIOHook : public SSLIOHook VerifyCertificate(); // Finish writing, if any left - ServerInstance->SE->ChangeEventMask(user, FD_WANT_POLL_READ | FD_WANT_NO_WRITE | FD_ADD_TRIAL_WRITE); + SocketEngine::ChangeEventMask(user, FD_WANT_POLL_READ | FD_WANT_NO_WRITE | FD_ADD_TRIAL_WRITE); return true; } @@ -734,7 +734,7 @@ info_done_dealloc: return -1; } - int rv = ServerInstance->SE->Recv(sock, reinterpret_cast<char *>(buffer), size, 0); + int rv = SocketEngine::Recv(sock, reinterpret_cast<char *>(buffer), size, 0); #ifdef _WIN32 if (rv < 0) @@ -749,7 +749,7 @@ info_done_dealloc: #endif if (rv < (int)size) - ServerInstance->SE->ChangeEventMask(sock, FD_READ_WILL_BLOCK); + SocketEngine::ChangeEventMask(sock, FD_READ_WILL_BLOCK); return rv; } @@ -770,7 +770,7 @@ info_done_dealloc: return -1; } - int rv = ServerInstance->SE->Send(sock, reinterpret_cast<const char *>(buffer), size, 0); + int rv = SocketEngine::Send(sock, reinterpret_cast<const char *>(buffer), size, 0); #ifdef _WIN32 if (rv < 0) @@ -785,7 +785,7 @@ info_done_dealloc: #endif if (rv < (int)size) - ServerInstance->SE->ChangeEventMask(sock, FD_WRITE_WILL_BLOCK); + SocketEngine::ChangeEventMask(sock, FD_WRITE_WILL_BLOCK); return rv; } @@ -888,18 +888,18 @@ info_done_dealloc: if (ret == (int)sendq.length()) { - ServerInstance->SE->ChangeEventMask(user, FD_WANT_NO_WRITE); + SocketEngine::ChangeEventMask(user, FD_WANT_NO_WRITE); return 1; } else if (ret > 0) { sendq = sendq.substr(ret); - ServerInstance->SE->ChangeEventMask(user, FD_WANT_SINGLE_WRITE); + SocketEngine::ChangeEventMask(user, FD_WANT_SINGLE_WRITE); return 0; } else if (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED || ret == 0) { - ServerInstance->SE->ChangeEventMask(user, FD_WANT_SINGLE_WRITE); + SocketEngine::ChangeEventMask(user, FD_WANT_SINGLE_WRITE); return 0; } else // (ret < 0) |