From be4618bf6429bddbd9208a88f460c028074fe8c0 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 13 Mar 2025 11:37:52 +0100 Subject: check_tcp: patch backwards compatibility in again --- plugins/check_tcp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 833cdc0c..d2ebc16d 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -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]; -- cgit v1.2.3-74-g34f1