diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-02-25 17:20:05 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-07 23:38:50 +0100 |
commit | 72fd885f4ff423d5351e3387867f2415f1ffc2d8 (patch) | |
tree | 50d47d6ec4ccc0d28f7a66503bfd960cf27c195e /plugins/check_ssh.c | |
parent | 3cbd84ce754b1f7ce1ac8f9bc46059da62392ffe (diff) | |
download | monitoring-plugins-72fd885f4ff423d5351e3387867f2415f1ffc2d8.tar.gz |
Transform output format to a global state
This commit removes the format parameter from the mp_check
object and creates a module global variable instead.
This prevents thread safe usage of different mp_check objects
which should likely not present a big problem for now.
The reason for this change is effectively the very same,
the format was lost if an exit was triggered by a signal
handler (timeout in this example).
Diffstat (limited to 'plugins/check_ssh.c')
-rw-r--r-- | plugins/check_ssh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 2ad7af66..9d0d7cde 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c | |||
@@ -77,7 +77,7 @@ int main(int argc, char **argv) { | |||
77 | 77 | ||
78 | mp_check overall = mp_check_init(); | 78 | mp_check overall = mp_check_init(); |
79 | if (config.output_format_is_set) { | 79 | if (config.output_format_is_set) { |
80 | overall.format = config.output_format; | 80 | mp_set_format(config.output_format); |
81 | } | 81 | } |
82 | 82 | ||
83 | /* initialize alarm signal handling */ | 83 | /* initialize alarm signal handling */ |