mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-26 00:27:45 -04:00
Required hostname not flagging as an error
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1220 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
63e9193516
commit
3fc34f5fa1
1 changed files with 6 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ int cpl = UNKNOWN_PACKET_LOSS;
|
|||
float wrta = UNKNOWN_TRIP_TIME;
|
||||
float crta = UNKNOWN_TRIP_TIME;
|
||||
char **addresses = NULL;
|
||||
int n_addresses;
|
||||
int n_addresses = 0;
|
||||
int max_addr = 1;
|
||||
int max_packets = -1;
|
||||
int verbose = 0;
|
||||
|
|
@ -392,6 +392,11 @@ validate_arguments ()
|
|||
usage2 (_("Invalid hostname/address"), addresses[i]);
|
||||
}
|
||||
|
||||
if (n_addresses == 0) {
|
||||
printf(_("You must specify a server address or host name\n"));
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue