diff options
Diffstat (limited to 'plugins/check_ssh.c')
-rw-r--r-- | plugins/check_ssh.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 7fcb8119..fdded583 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c | |||
@@ -32,7 +32,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; | |||
32 | #define SSH_DFL_PORT 22 | 32 | #define SSH_DFL_PORT 22 |
33 | #define BUFF_SZ 256 | 33 | #define BUFF_SZ 256 |
34 | 34 | ||
35 | short port = -1; | 35 | int port = -1; |
36 | char *server_name = NULL; | 36 | char *server_name = NULL; |
37 | int verbose = FALSE; | 37 | int verbose = FALSE; |
38 | 38 | ||
@@ -41,7 +41,7 @@ int validate_arguments (void); | |||
41 | void print_help (void); | 41 | void print_help (void); |
42 | void print_usage (void); | 42 | void print_usage (void); |
43 | 43 | ||
44 | int ssh_connect (char *haddr, short hport); | 44 | int ssh_connect (char *haddr, int hport); |
45 | 45 | ||
46 | int | 46 | int |
47 | main (int argc, char **argv) | 47 | main (int argc, char **argv) |
@@ -111,7 +111,8 @@ process_arguments (int argc, char **argv) | |||
111 | case 't': /* timeout period */ | 111 | case 't': /* timeout period */ |
112 | if (!is_integer (optarg)) | 112 | if (!is_integer (optarg)) |
113 | usage (_("Timeout Interval must be an integer!\n\n")); | 113 | usage (_("Timeout Interval must be an integer!\n\n")); |
114 | socket_timeout = atoi (optarg); | 114 | else |
115 | socket_timeout = atoi (optarg); | ||
115 | break; | 116 | break; |
116 | case '4': | 117 | case '4': |
117 | address_family = AF_INET; | 118 | address_family = AF_INET; |
@@ -178,7 +179,7 @@ validate_arguments (void) | |||
178 | *-----------------------------------------------------------------------*/ | 179 | *-----------------------------------------------------------------------*/ |
179 | 180 | ||
180 | int | 181 | int |
181 | ssh_connect (char *haddr, short hport) | 182 | ssh_connect (char *haddr, int hport) |
182 | { | 183 | { |
183 | int sd; | 184 | int sd; |
184 | int result; | 185 | int result; |