Module: check_mk
Branch: master
Commit: 14dc7b6d53f6f8fc07e70dab9003f495405ba234
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=14dc7b6d53f6f8…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu Dec 17 10:49:24 2015 +0100
windows agent: fixed fragmentation of udp packages
---
agents/windows/OutputProxy.cc | 3 ++-
agents/windows/OutputProxy.h | 7 +------
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 886784 -> 886784 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 886784 -> 886784 bytes
agents/windows/check_mk_agent.cc | 7 ++-----
agents/windows/check_mk_agent.exe | Bin 808448 -> 807936 bytes
agents/windows/check_mk_agent.msi | Bin 1954304 -> 1953792 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 808448 -> 807936 bytes
agents/windows/install_agent-64.exe | Bin 406153 -> 406134 bytes
agents/windows/install_agent.exe | Bin 396979 -> 396856 bytes
11 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/agents/windows/OutputProxy.cc b/agents/windows/OutputProxy.cc
index 963f191..673c9cd 100644
--- a/agents/windows/OutputProxy.cc
+++ b/agents/windows/OutputProxy.cc
@@ -177,9 +177,10 @@ bool BufferedSocketProxy::flushInt()
EncryptingBufferedSocketProxy::EncryptingBufferedSocketProxy(SOCKET socket,
const std::string &passphrase, size_t buffer_size, size_t collect_size)
- : BufferedSocketProxy(socket, buffer_size)
+ : BufferedSocketProxy(socket, buffer_size, collect_size)
, _crypto(passphrase)
{
+
_blockSize = _crypto.blockSize();
_plain.resize(_blockSize * 8);
diff --git a/agents/windows/OutputProxy.h b/agents/windows/OutputProxy.h
index 4f2a2da..9715595 100644
--- a/agents/windows/OutputProxy.h
+++ b/agents/windows/OutputProxy.h
@@ -66,7 +66,7 @@ protected:
std::vector<char> &buffer() { return _buffer; }
size_t length() const { return _length; }
-private:
+public:
static const size_t DEFAULT_BUFFER_SIZE = 16384L;
static const size_t DEFAULT_COLLECT_SIZE = 1300L;
@@ -99,11 +99,6 @@ class EncryptingBufferedSocketProxy : public BufferedSocketProxy {
Crypto _crypto;
-private:
-
- static const size_t DEFAULT_BUFFER_SIZE = 16384L;
- static const size_t DEFAULT_COLLECT_SIZE = 1300L;
-
std::vector<char> _plain;
size_t _blockSize;
size_t _written;
diff --git a/agents/windows/build_version b/agents/windows/build_version
index e3c00fd..3680448 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-1042
+1062
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index d638b86..bc13614 100755
Binary files a/agents/windows/check_mk_agent-64.exe and
b/agents/windows/check_mk_agent-64.exe differ
diff --git a/agents/windows/check_mk_agent-64.unversioned.exe
b/agents/windows/check_mk_agent-64.unversioned.exe
index f1783a4..e677972 100755
Binary files a/agents/windows/check_mk_agent-64.unversioned.exe and
b/agents/windows/check_mk_agent-64.unversioned.exe differ
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index 0e81382..1e6d0bb 100644
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -100,9 +100,6 @@ static const char RT_PROTOCOL_VERSION[2] = { '0', '0'
};
// Limits for static global arrays
#define MAX_EVENTLOGS 128
-// Default buffer size for reading performance counters
-#define DEFAULT_BUFFER_SIZE 40960L
-
// Maximum heap buffer for a single local/plugin script
// This buffer contains the check output
#define HEAP_BUFFER_DEFAULT 16384L
@@ -3145,6 +3142,7 @@ DWORD WINAPI realtime_check_func(void *data_in)
// windows. :(
static const size_t TARGET_DATAGRAM_SIZE = 65507L - 1000L;
EncryptingBufferedSocketProxy out(INVALID_SOCKET, g_config->passphrase(),
+ BufferedSocketProxy::DEFAULT_BUFFER_SIZE,
TARGET_DATAGRAM_SIZE);
timeval before;
gettimeofday(&before, 0);
@@ -3219,8 +3217,7 @@ DWORD WINAPI realtime_check_func(void *data_in)
// these writes are unencrypted!
out.writeBinary(RT_PROTOCOL_VERSION, 2);
out.writeBinary(timestamp, 10);
- output_data(out, data->env, g_config->realtimeSections(),
true);
- data->new_request = true;
+ output_data(out, data->env, g_config->realtimeSections(),
false);
}
}
}
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index c6776a6..c6df031 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ
diff --git a/agents/windows/check_mk_agent.msi b/agents/windows/check_mk_agent.msi
index 3845bca..f3de733 100755
Binary files a/agents/windows/check_mk_agent.msi and b/agents/windows/check_mk_agent.msi
differ
diff --git a/agents/windows/check_mk_agent.unversioned.exe
b/agents/windows/check_mk_agent.unversioned.exe
index d6fa563..fedb333 100755
Binary files a/agents/windows/check_mk_agent.unversioned.exe and
b/agents/windows/check_mk_agent.unversioned.exe differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index 31c305e..e598c58 100755
Binary files a/agents/windows/install_agent-64.exe and
b/agents/windows/install_agent-64.exe differ
diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe
index bcfe2f4..565b4a9 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ