mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-20 21:57:10 -04:00
check_tcp: patch backwards compatibility in again
This commit is contained in:
parent
4dd024388e
commit
be4618bf64
1 changed files with 11 additions and 0 deletions
|
|
@ -493,6 +493,17 @@ static check_tcp_config_wrapper process_arguments(int argc, char **argv, check_t
|
|||
usage4(_("No arguments found"));
|
||||
}
|
||||
|
||||
/* backwards compatibility */
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (strcmp("-to", argv[i]) == 0) {
|
||||
strcpy(argv[i], "-t");
|
||||
} else if (strcmp("-wt", argv[i]) == 0) {
|
||||
strcpy(argv[i], "-w");
|
||||
} else if (strcmp("-ct", argv[i]) == 0) {
|
||||
strcpy(argv[i], "-c");
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_option(argv[1])) {
|
||||
config.server_address = argv[1];
|
||||
argv[1] = argv[0];
|
||||
|
|
|
|||
Loading…
Reference in a new issue