diff options
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/check_ssh.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index e9c55ad7..8e29fa98 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c | |||
| @@ -222,7 +222,6 @@ ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol | |||
| 222 | char *ssh_server = NULL; | 222 | char *ssh_server = NULL; |
| 223 | static char *rev_no = VERSION; | 223 | static char *rev_no = VERSION; |
| 224 | struct timeval tv; | 224 | struct timeval tv; |
| 225 | double elapsed_time; | ||
| 226 | 225 | ||
| 227 | gettimeofday(&tv, NULL); | 226 | gettimeofday(&tv, NULL); |
| 228 | 227 | ||
| @@ -233,7 +232,6 @@ ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol | |||
| 233 | 232 | ||
| 234 | char *output = (char *) calloc (BUFF_SZ + 1, sizeof(char)); | 233 | char *output = (char *) calloc (BUFF_SZ + 1, sizeof(char)); |
| 235 | 234 | ||
| 236 | unsigned int iteration = 0; | ||
| 237 | ssize_t byte_offset = 0; | 235 | ssize_t byte_offset = 0; |
| 238 | 236 | ||
| 239 | while ((version_control_string == NULL) && (recv_ret = recv(sd, output+byte_offset, BUFF_SZ - byte_offset, 0) > 0)) { | 237 | while ((version_control_string == NULL) && (recv_ret = recv(sd, output+byte_offset, BUFF_SZ - byte_offset, 0) > 0)) { |
| @@ -335,6 +333,7 @@ ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol | |||
| 335 | exit (STATE_CRITICAL); | 333 | exit (STATE_CRITICAL); |
| 336 | } | 334 | } |
| 337 | 335 | ||
| 336 | double elapsed_time = (double)deltime(tv) / 1.0e6; | ||
| 338 | if (remote_protocol && strcmp(remote_protocol, ssh_proto)) { | 337 | if (remote_protocol && strcmp(remote_protocol, ssh_proto)) { |
| 339 | printf | 338 | printf |
| 340 | (_("SSH CRITICAL - %s (protocol %s) protocol version mismatch, expected '%s' | %s\n"), | 339 | (_("SSH CRITICAL - %s (protocol %s) protocol version mismatch, expected '%s' | %s\n"), |
| @@ -343,7 +342,6 @@ ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol | |||
| 343 | close(sd); | 342 | close(sd); |
| 344 | exit (STATE_CRITICAL); | 343 | exit (STATE_CRITICAL); |
| 345 | } | 344 | } |
| 346 | elapsed_time = (double)deltime(tv) / 1.0e6; | ||
| 347 | 345 | ||
| 348 | printf | 346 | printf |
| 349 | (_("SSH OK - %s (protocol %s) | %s\n"), | 347 | (_("SSH OK - %s (protocol %s) | %s\n"), |
