From: Alan T. DeKok Date: Tue, 2 Apr 2024 19:01:58 +0000 (-0400) Subject: make -r and -t work again X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fdf4fe70d0fa0c35e6d0808f4a8a2babd75d264;p=thirdparty%2Ffreeradius-server.git make -r and -t work again --- diff --git a/src/bin/radclient-ng.c b/src/bin/radclient-ng.c index fdd5687ea3d..a2138195cbb 100644 --- a/src/bin/radclient-ng.c +++ b/src/bin/radclient-ng.c @@ -66,8 +66,6 @@ typedef struct request_s request_t; /* to shut up warnings about mschap.h */ } \ } while (0) -static int retries = 3; -static fr_time_delta_t timeout = fr_time_delta_wrap((int64_t)5 * NSEC); /* 5 seconds */ static char *secret = NULL; static bool do_output = true; @@ -1015,6 +1013,9 @@ int main(int argc, char **argv) int do_summary = false; fr_dlist_head_t filenames; + int retries = 5; + fr_time_delta_t timeout = fr_time_delta_from_sec(2); + /* * It's easier having two sets of flags to set the * verbosity of library calls and the verbosity of @@ -1297,10 +1298,10 @@ int main(int argc, char **argv) */ client_config.allowed[packet_code] = true; client_config.retry[packet_code] = (fr_retry_config_t) { - .irt = fr_time_delta_from_sec(2), + .irt = timeout, .mrt = fr_time_delta_from_sec(16), .mrd = fr_time_delta_from_sec(30), - .mrc = 5, + .mrc = retries, }; client_config.retry_cfg.retry_config = client_config.retry[packet_code];