diff options
Diffstat (limited to 'plugins/t')
0 files changed, 0 insertions, 0 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; | |||
84 | int errcode, excode; | 84 | int errcode, excode; |
85 | 85 | ||
86 | int server_port = SMTP_PORT; | 86 | int server_port = SMTP_PORT; |
87 | int server_port_option = 0; | ||
87 | char *server_address = NULL; | 88 | char *server_address = NULL; |
88 | char *server_expect = NULL; | 89 | char *server_expect = NULL; |
89 | char *mail_command = NULL; | 90 | char *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 | ||