summaryrefslogtreecommitdiffstats
path: root/plugins/check_ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ssh.c')
-rw-r--r--plugins/check_ssh.c9
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
35short port = -1; 35int port = -1;
36char *server_name = NULL; 36char *server_name = NULL;
37int verbose = FALSE; 37int verbose = FALSE;
38 38
@@ -41,7 +41,7 @@ int validate_arguments (void);
41void print_help (void); 41void print_help (void);
42void print_usage (void); 42void print_usage (void);
43 43
44int ssh_connect (char *haddr, short hport); 44int ssh_connect (char *haddr, int hport);
45 45
46int 46int
47main (int argc, char **argv) 47main (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
180int 181int
181ssh_connect (char *haddr, short hport) 182ssh_connect (char *haddr, int hport)
182{ 183{
183 int sd; 184 int sd;
184 int result; 185 int result;