summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin Burchell <viroteck@viroteck.net>2012-05-29 01:21:00 -0700
committerRobin Burchell <viroteck@viroteck.net>2012-05-29 01:21:00 -0700
commit7ca4e7f0450b376902b4987190e06c2a719a89c4 (patch)
treef77fadabc513dcc8e32f06bddf14b40f3e1a0073 /src
parent52458f91f1c03294d8edf2f264051b8e1e25f853 (diff)
parentee947c5aa6541b5115645755d924eeb66e7d6738 (diff)
Merge pull request #156 from attilamolnar/insp20+statszfix
[2.0] Improve bandwidth usage statistics (/STATS z)
Diffstat (limited to 'src')
-rw-r--r--src/inspsocket.cpp2
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 1254dc58b..3841c6147 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -194,7 +194,7 @@ void StreamSocket::DoRead()
else
{
char* ReadBuffer = ServerInstance->GetReadBuffer();
- int n = recv(fd, ReadBuffer, ServerInstance->Config->NetBufferSize, 0);
+ int n = ServerInstance->SE->Recv(this, ReadBuffer, ServerInstance->Config->NetBufferSize, 0);
if (n == ServerInstance->Config->NetBufferSize)
{
ServerInstance->SE->ChangeEventMask(this, FD_WANT_FAST_READ | FD_ADD_TRIAL_READ);
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<char *>(buffer), size, 0);
+ int rv = ServerInstance->SE->Recv(user, reinterpret_cast<char *>(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<const char *>(buffer), size, 0);
+ int rv = ServerInstance->SE->Send(user, reinterpret_cast<const char *>(buffer), size, 0);
if (rv < (int)size)
ServerInstance->SE->ChangeEventMask(user, FD_WRITE_WILL_BLOCK);
return rv;