fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/39522?usp=email )
Change subject: {erab_fsm,sctp_proxy}: handle_event/4: reply to unknown calls ......................................................................
{erab_fsm,sctp_proxy}: handle_event/4: reply to unknown calls
Change-Id: Ic02e3cb390e7d8a7865b4027c29cd0115a94e14e Related: SYS#7318 --- M src/erab_fsm.erl M src/sctp_proxy.erl 2 files changed, 8 insertions(+), 0 deletions(-)
Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/erab_fsm.erl b/src/erab_fsm.erl index 9a654e5..9ee9abe 100644 --- a/src/erab_fsm.erl +++ b/src/erab_fsm.erl @@ -405,6 +405,10 @@ Reply = lists:filter(fun({_, V}) -> V =/= undefined end, Info), {keep_state_and_data, {reply, From, Reply}};
+handle_event(State, {call, From}, EventData, _S) -> + ?LOG_ERROR("Unexpected call in state ~p: ~p", [State, EventData]), + {keep_state_and_data, {reply, From, {error, {unexpected_call, State}}}}; + handle_event(State, Event, EventData, _S) -> ?LOG_ERROR("Unexpected event ~p in state ~p: ~p", [Event, State, EventData]), keep_state_and_data. diff --git a/src/sctp_proxy.erl b/src/sctp_proxy.erl index ed4af02..1c3228a 100644 --- a/src/sctp_proxy.erl +++ b/src/sctp_proxy.erl @@ -216,6 +216,10 @@ Reply = proplists:from_map(S2), {keep_state_and_data, {reply, From, Reply}};
+handle_event(State, {call, From}, EventData, _S) -> + ?LOG_ERROR("Unexpected call in state ~p: ~p", [State, EventData]), + {keep_state_and_data, {reply, From, {error, {unexpected_call, State}}}}; + handle_event(State, Event, EventData, _S) -> ?LOG_ERROR("Unexpected event ~p in state ~p: ~p", [Event, State, EventData]), keep_state_and_data.