From 77ce61d5487e7a76ac992bd91893079091ded524 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 21 Jun 2012 15:01:54 +0200 Subject: [PATCH] Bugfixes. --- base/tlsclient.cpp | 4 +++- components/delegation/delegationcomponent.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/base/tlsclient.cpp b/base/tlsclient.cpp index 3e0c2d156..28c2415f1 100644 --- a/base/tlsclient.cpp +++ b/base/tlsclient.cpp @@ -151,7 +151,9 @@ void TlsClient::WritableEventHandler(void) m_BlockRead = false; m_BlockWrite = false; - rc = SSL_write(m_SSL.get(), (const char *)GetSendQueue()->GetReadBuffer(), GetSendQueue()->GetSize()); + size_t write_size = std::min(GetSendQueue()->GetSize(), (size_t)(16 * 1024)); + + rc = SSL_write(m_SSL.get(), (const char *)GetSendQueue()->GetReadBuffer(), write_size); if (rc <= 0) { int error = SSL_get_error(m_SSL.get(), rc); diff --git a/components/delegation/delegationcomponent.cpp b/components/delegation/delegationcomponent.cpp index 1417a293b..a499c7ac2 100644 --- a/components/delegation/delegationcomponent.cpp +++ b/components/delegation/delegationcomponent.cpp @@ -210,6 +210,7 @@ void DelegationComponent::DelegationTimerHandler(void) if (delegated > 0) { // TODO: send clear message when session is established // TODO: clear local assignments when session is lost + need_clear = true; /* remove this once clear messages are properly sent */ if (need_clear) { map::iterator hit; for (hit = histogram.begin(); hit != histogram.end(); hit++) {