Module: check_mk
Branch: master
Commit: 9c29149661d59b491d97d7f7d539b0f6108bc33e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9c29149661d59b…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Mon Feb 22 13:46:35 2016 +0100
#3082 FIX windows agent: with realtime updates active, shutting down the agent could take
very long
---
.werks/3082 | 10 ++++++++++
ChangeLog | 1 +
agents/windows/build_version | 2 +-
agents/windows/check_mk_agent-64.exe | Bin 909824 -> 909824 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 909824 -> 909824 bytes
agents/windows/check_mk_agent.cc | 7 +++++--
agents/windows/check_mk_agent.exe | Bin 835584 -> 835584 bytes
agents/windows/check_mk_agent.msi | Bin 2006016 -> 2006016 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 835584 -> 835584 bytes
agents/windows/install_agent-64.exe | Bin 418357 -> 418319 bytes
agents/windows/install_agent.exe | Bin 408679 -> 408689 bytes
11 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/.werks/3082 b/.werks/3082
new file mode 100644
index 0000000..b8f7880
--- /dev/null
+++ b/.werks/3082
@@ -0,0 +1,10 @@
+Title: windows agent: with realtime updates active, shutting down the agent could take
very long
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1456145003
+
+
diff --git a/ChangeLog b/ChangeLog
index 5fcc6ee..cf484f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
* 3079 FIX: win_printers: fixed typo that kept default parameters from being used...
* 3227 FIX: Automatic service adding: Fixed exception when using time range to skip
automatic configuration...
* 3178 FIX: docsis_channels_upstream: Fixed crash in graphs
+ * 3082 FIX: windows agent: with realtime updates active, shutting down the agent
could take very long
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/agents/windows/build_version b/agents/windows/build_version
index b0077c6..7776e09 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-1351
+1358
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index b2c0c4a..100123c 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 411cd10..1a8714e 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 4384615..c654791 100644
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -3141,7 +3141,7 @@ DWORD WINAPI realtime_check_func(void *data_in) {
MutexLock guard(data->mutex);
// adhere to the configured timeout
- if (time(NULL) < data->push_until) {
+ if ((time(NULL) < data->push_until) && !data->terminate) {
// if a new request was made, reestablish the connection
if (data->new_request) {
data->new_request = false;
@@ -3325,12 +3325,15 @@ void do_adhoc(const Environment &env) {
if (realtime_checker.wasStarted()) {
thread_data.terminate = true;
+ }
+
+ stop_threads();
+ if (realtime_checker.wasStarted()) {
int res = realtime_checker.join();
crash_log("realtime check thread ended with errror code %d.", res);
}
- stop_threads();
WSACleanup();
close_crash_log();
}
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index 70e33d6..77800b6 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 89b8f9d..994de6b 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 f13645f..e1f7237 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 6fc9446..cc4cff8 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 932cdfb..af99acc 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ