mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-20 00:10:09 -05:00
check_smtp: fix positional host logic
This commit is contained in:
parent
897fef9370
commit
5cf53de34f
2 changed files with 3 additions and 1 deletions
|
|
@ -697,6 +697,8 @@ check_smtp_config_wrapper process_arguments(int argc, char **argv) {
|
|||
} else {
|
||||
usage2(_("Invalid hostname/address"), argv[c]);
|
||||
}
|
||||
} else {
|
||||
result.config.server_address = strdup("localhost");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ typedef struct {
|
|||
check_smtp_config check_smtp_config_init() {
|
||||
check_smtp_config tmp = {
|
||||
.server_port = SMTP_PORT,
|
||||
.server_address = strdup("localhost"),
|
||||
.server_address = NULL,
|
||||
.localhostname = NULL,
|
||||
|
||||
.server_expect = SMTP_EXPECT,
|
||||
|
|
|
|||
Loading…
Reference in a new issue