diff options
Diffstat (limited to 'plugins/check_ssh.c')
-rw-r--r-- | plugins/check_ssh.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index b73cdf24..3e25910d 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c | |||
@@ -75,16 +75,15 @@ int main(int argc, char **argv) { | |||
75 | 75 | ||
76 | check_ssh_config config = tmp_config.config; | 76 | check_ssh_config config = tmp_config.config; |
77 | 77 | ||
78 | /* initialize alarm signal handling */ | ||
79 | signal(SIGALRM, socket_timeout_alarm_handler); | ||
80 | |||
81 | alarm(socket_timeout); | ||
82 | |||
83 | mp_check overall = mp_check_init(); | 78 | mp_check overall = mp_check_init(); |
84 | if (config.output_format_is_set) { | 79 | if (config.output_format_is_set) { |
85 | overall.format = config.output_format; | 80 | overall.format = config.output_format; |
86 | } | 81 | } |
87 | 82 | ||
83 | /* initialize alarm signal handling */ | ||
84 | signal(SIGALRM, socket_timeout_alarm_handler); | ||
85 | alarm(socket_timeout); | ||
86 | |||
88 | /* ssh_connect exits if error is found */ | 87 | /* ssh_connect exits if error is found */ |
89 | ssh_connect(&overall, config.server_name, config.port, config.remote_version, config.remote_protocol); | 88 | ssh_connect(&overall, config.server_name, config.port, config.remote_version, config.remote_protocol); |
90 | 89 | ||