xua_asp_fsm: Only send ASPAS event from ASP to AS if AS pid != undefined

This commit is contained in:
Harald Welte 2013-07-27 14:12:58 +08:00
parent 69b5f279a1
commit 43ceb09099
1 changed files with 6 additions and 1 deletions

View File

@ -262,7 +262,12 @@ state2aspas(asp_active) -> 'ASP_ACTIVE'.
% propagate an ASP state transition as ASPAS primitive to AS
next_state(State, LoopDat = #asp_state{as_pid = AsPid}) ->
Prim = osmo_util:make_prim('ASPAS', state2aspas(State), indication),
gen_fsm:send_event(AsPid, Prim),
case AsPid of
undefined ->
ok;
_ ->
gen_fsm:send_event(AsPid, Prim)
end,
{next_state, State, LoopDat}.
% Helper function to send data to the SCTP peer