]> granicus.if.org Git - icinga2/commitdiff
Bugfixes.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 21 Jun 2012 13:01:54 +0000 (15:01 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 21 Jun 2012 13:01:54 +0000 (15:01 +0200)
base/tlsclient.cpp
components/delegation/delegationcomponent.cpp

index 3e0c2d156ad540334a7beb41d46ec6eda97c414a..28c2415f1869af86a41930afb159882b62c5c783 100644 (file)
@@ -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);
index 1417a293b1f0e986935de7d69039942bf80997e5..a499c7ac29f02503257d0c8f36526d70a5743adc 100644 (file)
@@ -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<Endpoint::Ptr, int>::iterator hit;
                        for (hit = histogram.begin(); hit != histogram.end(); hit++) {