summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_smtp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 3990ad8..fc0ae2c 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -84,6 +84,7 @@ int eflags = 0;
84int errcode, excode; 84int errcode, excode;
85 85
86int server_port = SMTP_PORT; 86int server_port = SMTP_PORT;
87int server_port_option = 0;
87char *server_address = NULL; 88char *server_address = NULL;
88char *server_expect = NULL; 89char *server_expect = NULL;
89char *mail_command = NULL; 90char *mail_command = NULL;
@@ -544,7 +545,7 @@ process_arguments (int argc, char **argv)
544 break; 545 break;
545 case 'p': /* port */ 546 case 'p': /* port */
546 if (is_intpos (optarg)) 547 if (is_intpos (optarg))
547 server_port = atoi (optarg); 548 server_port_option = atoi (optarg);
548 else 549 else
549 usage4 (_("Port must be a positive integer")); 550 usage4 (_("Port must be a positive integer"));
550 break; 551 break;
@@ -719,6 +720,10 @@ process_arguments (int argc, char **argv)
719 usage4 (_("Set either -s/--ssl/--tls or -S/--starttls")); 720 usage4 (_("Set either -s/--ssl/--tls or -S/--starttls"));
720 } 721 }
721 722
723 if (server_port_option != 0) {
724 server_port = server_port_option;
725 }
726
722 return validate_arguments (); 727 return validate_arguments ();
723} 728}
724 729