From d5260e0a5d0d59d5f3fdb7111913f1bfa9fb5665 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 10 Jun 2013 09:38:48 +0200 Subject: [PATCH] TSM: print reason for termination in debug logging --- TCAP/src/ITU/tcap_tsm_fsm.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TCAP/src/ITU/tcap_tsm_fsm.erl b/TCAP/src/ITU/tcap_tsm_fsm.erl index 9a20797..44e5ea9 100644 --- a/TCAP/src/ITU/tcap_tsm_fsm.erl +++ b/TCAP/src/ITU/tcap_tsm_fsm.erl @@ -434,8 +434,9 @@ handle_info(Info, StateName, State) -> {next_state, StateName, State}. %% handle a shutdown request -terminate(_Reason, _StateName, State) -> - io:format("Deleting {~p, ~p} from tcap_transactions~n", [ State#state.localTID, self()]), +terminate(Reason, StateName, State) -> + io:format("Deleting {~p, ~p} from tcap_transactions (state ~p, reason ~p)~n", + [ State#state.localTID, self(), StateName, Reason]), ets:delete(tcap_transaction, State#state.localTID), %% signal TCO that we are stopping gen_server:cast(State#state.tco, {'tsm-stopped', State#state.supref}).