diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-15 13:18:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-15 13:18:17 +0200 |
| commit | 8ef825d85fb4d09c32ca44c545d6eb8d995ddea4 (patch) | |
| tree | 5ab7b18797dfd5849dec7827c87ca3bb5fcb0993 /plugins/check_users.d | |
| parent | a3cf9041af810770daf5d9b83f1906fa9bb0dd11 (diff) | |
| parent | 204cf956f0b3db90d079321ee957b3860da7e33f (diff) | |
| download | monitoring-plugins-8ef825d85fb4d09c32ca44c545d6eb8d995ddea4.tar.gz | |
Merge pull request #2149 from RincewindsHat/clang-format
Clang format
Diffstat (limited to 'plugins/check_users.d')
| -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); |
