Module: check_mk
Branch: master
Commit: 8e49670210228005cc034b56cb93cdaa15ebc498
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8e496702102280…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 3 17:41:42 2014 +0100
Fix two compile problems in Windows agent
---
agents/windows/check_mk_agent.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index 33b9d89..852fd5b 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -3651,7 +3651,7 @@ void add_only_from(char *value)
int bits = 32;
if (strchr(value, '/')) {
- if (5 != sscanf(value, "%u.%u.%u.%u/%u", &a, &b, &c,
&d, &bits)) {
+ if (5 != sscanf(value, "%u.%u.%u.%u/%d", &a, &b, &c,
&d, &bits)) {
fprintf(stderr, "Invalid value %s for only_hosts\n", value);
exit(1);
}
@@ -4200,7 +4200,8 @@ void stop_threads()
// Signal any threads to shut down
// We don't rely on any check threat running/suspended calls
// just check the script_container status
- HANDLE hThreadArray[script_containers.size()];
+ int sizedt = script_containers.size();
+ HANDLE hThreadArray[sizedt];
int active_thread_count = 0;
script_containers_t::iterator it_cont = script_containers.begin();