diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-15 16:16:14 +0200 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-15 16:16:14 +0200 |
commit | ff7305bdfe2f682857ba888c70aec2fc7cee798e (patch) | |
tree | b5b3bdcf41d42d525906b6e8d82cdf143e74ec5d /plugins/check_users.d/users.c | |
parent | f07f96c3cfaeb30f95eb1898d6cc58b200e70831 (diff) | |
parent | 601a48a63e745817cf2a4c7f3ca526e393dd3fb8 (diff) | |
download | monitoring-plugins-ff7305bdfe2f682857ba888c70aec2fc7cee798e.tar.gz |
Merge branch 'master' into refactor/check_apt
Diffstat (limited to 'plugins/check_users.d/users.c')
-rw-r--r-- | plugins/check_users.d/users.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/check_users.d/users.c b/plugins/check_users.d/users.c index a8b168a0..f37819b1 100644 --- a/plugins/check_users.d/users.c +++ b/plugins/check_users.d/users.c | |||
@@ -23,7 +23,8 @@ get_num_of_users_wrapper get_num_of_users_windows() { | |||
23 | LPTSTR username; | 23 | LPTSTR username; |
24 | DWORD size; | 24 | DWORD size; |
25 | 25 | ||
26 | if (!WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE, wtsinfo[index].SessionId, WTSUserName, &username, &size)) { | 26 | if (!WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE, wtsinfo[index].SessionId, |
27 | WTSUserName, &username, &size)) { | ||
27 | continue; | 28 | continue; |
28 | } | 29 | } |
29 | 30 | ||
@@ -150,7 +151,8 @@ get_num_of_users_wrapper get_num_of_users_who_command() { | |||
150 | 151 | ||
151 | /* check STDERR */ | 152 | /* check STDERR */ |
152 | if (fgets(input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) { | 153 | if (fgets(input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) { |
153 | // if this fails, something broke and the result can not be relied upon or so is the theorie here | 154 | // if this fails, something broke and the result can not be relied upon or so is the theorie |
155 | // here | ||
154 | result.errorcode = STDERR_COULD_NOT_BE_READ; | 156 | result.errorcode = STDERR_COULD_NOT_BE_READ; |
155 | } | 157 | } |
156 | (void)fclose(child_stderr); | 158 | (void)fclose(child_stderr); |