summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-08 14:28:02 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-08 14:28:02 +0200
commit3a11a742ba35155e1b2e14dc4ef1a4f7f659ea13 (patch)
tree57bf58a4299457a365ebb6d5120a4154871dff6f /src
parent019914b67d69b59bb1920c19fa4346f6a75a4868 (diff)
Pass sendq to OnStreamSocketWrite
Diffstat (limited to 'src')
-rw-r--r--src/inspsocket.cpp2
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp3
-rw-r--r--src/modules/extra/m_ssl_mbedtls.cpp3
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp3
4 files changed, 4 insertions, 7 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 89c3a71a9..dcc455482 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -201,7 +201,7 @@ void StreamSocket::DoWrite()
if (GetIOHook())
{
- int rv = GetIOHook()->OnStreamSocketWrite(this);
+ int rv = GetIOHook()->OnStreamSocketWrite(this, sendq);
if (rv < 0)
SetError("Write Error"); // will not overwrite a better error message
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index a1c989163..44a49d895 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -1086,7 +1086,7 @@ info_done_dealloc:
}
}
- int OnStreamSocketWrite(StreamSocket* user) CXX11_OVERRIDE
+ int OnStreamSocketWrite(StreamSocket* user, StreamSocket::SendQueue& sendq) CXX11_OVERRIDE
{
// Finish handshake if needed
int prepret = PrepareIO(user);
@@ -1094,7 +1094,6 @@ info_done_dealloc:
return prepret;
// Session is ready for transferring application data
- StreamSocket::SendQueue& sendq = user->GetSendQ();
#ifdef INSPIRCD_GNUTLS_HAS_CORK
while (true)
diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp
index 8578b8196..7efcce72d 100644
--- a/src/modules/extra/m_ssl_mbedtls.cpp
+++ b/src/modules/extra/m_ssl_mbedtls.cpp
@@ -698,7 +698,7 @@ class mbedTLSIOHook : public SSLIOHook
}
}
- int OnStreamSocketWrite(StreamSocket* sock) CXX11_OVERRIDE
+ int OnStreamSocketWrite(StreamSocket* sock, StreamSocket::SendQueue& sendq) CXX11_OVERRIDE
{
// Finish handshake if needed
int prepret = PrepareIO(sock);
@@ -706,7 +706,6 @@ class mbedTLSIOHook : public SSLIOHook
return prepret;
// Session is ready for transferring application data
- StreamSocket::SendQueue& sendq = sock->GetSendQ();
while (!sendq.empty())
{
FlattenSendQueue(sendq, profile->GetOutgoingRecordSize());
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 80c9d9395..5587f323a 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -656,7 +656,7 @@ class OpenSSLIOHook : public SSLIOHook
}
}
- int OnStreamSocketWrite(StreamSocket* user) CXX11_OVERRIDE
+ int OnStreamSocketWrite(StreamSocket* user, StreamSocket::SendQueue& sendq) CXX11_OVERRIDE
{
// Finish handshake if needed
int prepret = PrepareIO(user);
@@ -666,7 +666,6 @@ class OpenSSLIOHook : public SSLIOHook
data_to_write = true;
// Session is ready for transferring application data
- StreamSocket::SendQueue& sendq = user->GetSendQ();
while (!sendq.empty())
{
ERR_clear_error();