From ee947c5aa6541b5115645755d924eeb66e7d6738 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Mon, 28 May 2012 22:10:28 +0200 Subject: Use socketengine functions for sending and receiving data instead of plain send() and recv() so /STATS z displays correct bandwidth usage --- src/modules/extra/m_ssl_gnutls.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules') diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index cc934ff77..22c027cfb 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -56,7 +56,7 @@ static ssize_t gnutls_pull_wrapper(gnutls_transport_ptr_t user_wrap, void* buffe errno = EAGAIN; return -1; } - int rv = recv(user->GetFd(), reinterpret_cast(buffer), size, 0); + int rv = ServerInstance->SE->Recv(user, reinterpret_cast(buffer), size, 0); if (rv < (int)size) ServerInstance->SE->ChangeEventMask(user, FD_READ_WILL_BLOCK); return rv; @@ -70,7 +70,7 @@ static ssize_t gnutls_push_wrapper(gnutls_transport_ptr_t user_wrap, const void* errno = EAGAIN; return -1; } - int rv = send(user->GetFd(), reinterpret_cast(buffer), size, 0); + int rv = ServerInstance->SE->Send(user, reinterpret_cast(buffer), size, 0); if (rv < (int)size) ServerInstance->SE->ChangeEventMask(user, FD_WRITE_WILL_BLOCK); return rv; -- cgit v1.2.3