Module: check_mk
Branch: master
Commit: 7fa36bfe1f1841dbde86f6133e0a2c0bf80127a7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7fa36bfe1f1841…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Sep 30 14:47:28 2013 +0200
FIX: windows_agent: fixed bug in cleanup of open thread handles
---
ChangeLog | 1 +
agents/windows/check_mk_agent-64.exe | Bin 179200 -> 179200 bytes
agents/windows/check_mk_agent.cc | 5 +++++
agents/windows/check_mk_agent.exe | Bin 151040 -> 151040 bytes
agents/windows/install_agent-64.exe | Bin 149246 -> 149297 bytes
agents/windows/install_agent.exe | Bin 146741 -> 146756 bytes
6 files changed, 6 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 6ca185d..55dc03d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.2.3i3:
Checks & Agents:
* windows_agent: increased maximum plugin output buffer size to 2MB
+ * FIX: windows_agent: fixed bug in cleanup of open thread handles
1.2.3i2:
diff --git a/agents/windows/check_mk_agent-64.exe b/agents/windows/check_mk_agent-64.exe
index 3ca08ee..3ae686b 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.cc b/agents/windows/check_mk_agent.cc
index 8c785f0..bc6d7b6 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -2422,6 +2422,9 @@ void run_external_programs(char *dirname, script_type type, bool
dry_run = false
cont->buffer_time = time(0);
cont->status = SCRIPT_COLLECT;
crash_log("Thread start: %s", cont->path);
+
+ if (cont->worker_thread != INVALID_HANDLE_VALUE)
+ CloseHandle(cont->worker_thread);
cont->worker_thread = CreateThread(
NULL, // default security attributes
0, // use default stack size
@@ -3745,6 +3748,8 @@ void start_external_data_collection()
}
}
+ if (g_collection_thread != INVALID_HANDLE_VALUE)
+ CloseHandle(g_collection_thread);
crash_log("Start thread for collecting local/plugin data");
g_collection_thread = CreateThread(NULL, // default security attributes
0, // use default stack size
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index 9ebfcc3..e9cd4f4 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe
differ
diff --git a/agents/windows/install_agent-64.exe b/agents/windows/install_agent-64.exe
index 8457418..b13071d 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 c0a5cab..956f445 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe
differ