Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
RoadRunnr committed Jan 24, 2023
1 parent 9c38415 commit ee27004
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/ergw_aaa_nasreq.erl
Original file line number Diff line number Diff line change
Expand Up @@ -342,19 +342,19 @@ handle_aaa(['AAA' | #{'Result-Code' := RC} = Avps], Session0, Events0, _Opts, St
{ok, Session, Events, State};
handle_aaa([Answer | #{'Result-Code' := Code}], Session, Events, _Opts, State)
when Answer =:= 'AAA'; Answer =:= 'answer-message' ->
{{fail, Code}, Session, Events, State};
{{fail, Code}, Session, Events, State#state{state = stopped}};
handle_aaa({error, _} = Result, Session, Events, _Opts, State) ->
{Result, Session, Events, State}.
{Result, Session, Events, State#state{state = stopped}}.

handle_aca(['ACA' | #{'Result-Code' := RC} = Avps], Session0, Events0, _Opts, State)
when RC < 3000 ->
{Session, Events} = to_session({?APP, 'ACA'}, {Session0, Events0}, Avps),
{ok, Session, Events, State};
handle_aca([Answer | #{'Result-Code' := RC}], Session, Events, _Opts, State)
when Answer =:= 'ACA'; Answer =:= 'answer-message' ->
{{fail, RC}, Session, [{stop, {?APP, peer_reject}} | Events], State};
{{fail, RC}, Session, [{stop, {?APP, peer_reject}} | Events], State#state{state = stopped}};
handle_aca({error, _} = Result, Session, Events, _Opts, State) ->
{Result, Session, Events, State}.
{Result, Session, Events, State#state{state = stopped}}.

% Ignore STR sending errors
handle_sta({error, _}, Session, Events, _Opts, State) ->
Expand Down
2 changes: 1 addition & 1 deletion src/ergw_aaa_rf.erl
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ handle_aca(['ACA' | #{'Result-Code' := ?'DIAMETER_BASE_RESULT-CODE_SUCCESS'} = A
{ok, Session, Events, State};
handle_aca([Answer | #{'Result-Code' := Code}], Session, Events, _Opts, State)
when Answer =:= 'ACA'; Answer =:= 'answer-message' ->
{{fail, Code}, Session, Events, State};
{{fail, Code}, Session, Events, State#state{state = stopped}};
handle_aca({error, _} = Result, Session, Events, _Opts, State) ->
{Result, Session, Events, State}.

Expand Down
4 changes: 2 additions & 2 deletions src/ergw_aaa_ro.erl
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ handle_cca(['CCA' | #{'Result-Code' := Code} = Avps],
when Code < 3000 ->
{Session, Events} = to_session({?API, 'CCA'}, {Session0, Events0}, Avps),
{ok, Session, Events, State};
handle_cca([Answer | #{'Result-Code' := Code}], Session, Events, _Opts, State)
handle_cca([Answer | #{'Result-Code' := Code} = Avps], Session, Events, _Opts, State)
when Answer =:= 'CCA'; Answer =:= 'answer-message' ->
{{fail, Code}, Session, [{stop, {?API, peer_reject}} | Events], State};
{{fail, Code}, Session, [{stop, {?API, peer_reject}} | Events], State#state{state = stopped}};
handle_cca({error, no_connection}, Session, Events,
#{answer_if_down := Answer, answers := Answers} = Opts, State0) ->
{Avps, State} =
Expand Down

0 comments on commit ee27004

Please sign in to comment.