From 6f66863df88a71e7327c3a888befee68b2672462 Mon Sep 17 00:00:00 2001 From: Ariel Otilibili Date: Tue, 19 Nov 2024 23:52:30 +0100 Subject: [PATCH] src/tsung_controller: replace deprecated `gen_fsm` by `gen_statem` Link: https://www.erlang.org/doc/deprecations.html#functions-deprecated-in-otp-20 Signed-off-by: Ariel Otilibili --- src/tsung_controller/ts_timer.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tsung_controller/ts_timer.erl b/src/tsung_controller/ts_timer.erl index c3bd65ce..ccb6371b 100644 --- a/src/tsung_controller/ts_timer.erl +++ b/src/tsung_controller/ts_timer.erl @@ -52,18 +52,18 @@ %%%---------------------------------------------------------------------- start(NClients) -> ?LOG("starting fsm timer",?INFO), - gen_fsm:start_link({global, ?MODULE}, ?MODULE, [NClients], []). + gen_statem:start_link({global, ?MODULE}, ?MODULE, [NClients], []). config(NClients) -> ?LOGF("Configure fsm timer with ~p",[NClients],?INFO), - gen_fsm:send_event({global, ?MODULE}, {config, NClients}). + gen_statem:send_event({global, ?MODULE}, {config, NClients}). set_timeout(Timeout) -> ?LOGF("Configure fsm timer timeout to with ~p",[Timeout],?INFO), - gen_fsm:send_event({global, ?MODULE}, {set_timeout, Timeout}). + gen_statem:send_event({global, ?MODULE}, {set_timeout, Timeout}). connected(Pid) -> - gen_fsm:send_event({global, ?MODULE}, {connected, Pid}). + gen_statem:send_event({global, ?MODULE}, {connected, Pid}). %%%---------------------------------------------------------------------- %%% Callback functions from gen_fsm