summaryrefslogtreecommitdiffstats
path: root/plugins/check_ssh.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-02-25 11:32:18 +0100
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-03-07 23:38:50 +0100
commitadd5bfb1e4029e406f7f331407c9d0f28d6d789b (patch)
treeb8833d0ab3506c0308ad2105ab8d521d9affbc6d /plugins/check_ssh.c
parent5ee9a5eadd7c9252fc4deb6cc502535d8e0e49d5 (diff)
downloadmonitoring-plugins-add5bfb1e4029e406f7f331407c9d0f28d6d789b.tar.gz
check_ssh: Move default SSH constant around a bit
Diffstat (limited to 'plugins/check_ssh.c')
-rw-r--r--plugins/check_ssh.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index 0f1c0835..b73cdf24 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -44,7 +44,6 @@ const char *email = "devel@monitoring-plugins.org";
44# define MSG_DONTWAIT 0 44# define MSG_DONTWAIT 0
45#endif 45#endif
46 46
47#define SSH_DFL_PORT 22
48#define BUFF_SZ 256 47#define BUFF_SZ 256
49 48
50static bool verbose = false; 49static bool verbose = false;
@@ -219,9 +218,7 @@ process_arguments_wrapper process_arguments(int argc, char **argv) {
219 result.errorcode = ERROR; 218 result.errorcode = ERROR;
220 return result; 219 return result;
221 } 220 }
222 if (result.config.port == -1) { /* funky, but allows -p to override stray integer in args */ 221
223 result.config.port = SSH_DFL_PORT;
224 }
225 return result; 222 return result;
226} 223}
227 224
@@ -398,7 +395,7 @@ int ssh_connect(mp_check *overall, char *haddr, int hport, char *desired_remote_
398 395
399void print_help(void) { 396void print_help(void) {
400 char *myport; 397 char *myport;
401 xasprintf(&myport, "%d", SSH_DFL_PORT); 398 xasprintf(&myport, "%d", default_ssh_port);
402 399
403 print_revision(progname, NP_VERSION); 400 print_revision(progname, NP_VERSION);
404 401