aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-05-30 13:09:58 +0200
committerHarald Welte <laforge@gnumonks.org>2012-05-30 13:09:58 +0200
commit237d60cd039adab6bc0c4c25fcca227612bc3b90 (patch)
tree2cccbf71d4bdddc7016a882f74da0a150218c13d /src
parent1c230b0b47199c76432a563d03142fec752b9b8e (diff)
mangle_tt_sri_sm: don't throw excaption if mangle_tt_sri_sm_pfx environment is not set
Diffstat (limited to 'src')
-rw-r--r--src/mangle_tt_sri_sm.erl28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/mangle_tt_sri_sm.erl b/src/mangle_tt_sri_sm.erl
index 25db695..a38cc22 100644
--- a/src/mangle_tt_sri_sm.erl
+++ b/src/mangle_tt_sri_sm.erl
@@ -166,21 +166,25 @@ check_for_tcap_op(Comp, Op, MapDec) ->
mangle_tt_sri_sm(from_msc, _Path, ?SCCP_MSGT_UDT, SccpDec = #sccp_msg{parameters=Opts}) ->
CalledParty = proplists:get_value(called_party_addr, Opts),
CalledGT = CalledParty#sccp_addr.global_title,
- {ok, PrefixList} = application:get_env(mgw_nat, mangle_tt_sri_sm_pfx),
- case gt_match_pfx_list(CalledGT, PrefixList) of
- true ->
+ case application:get_env(mgw_nat, mangle_tt_sri_sm_pfx) of
+ {ok, PrefixList} ->
+ case gt_match_pfx_list(CalledGT, PrefixList) of
+ true ->
case check_for_invoke_sri_sm(SccpDec) of
- true ->
- CalledGTNew = CalledGT#global_title{trans_type = 3},
- CalledPartyNew = CalledParty#sccp_addr{global_title = CalledGTNew},
- ParamsOut = lists:keyreplace(called_party_addr, 1, Opts,
- {called_party_addr, CalledPartyNew}),
- SccpDec#sccp_msg{parameters=ParamsOut};
- _ ->
- SccpDec
+ true ->
+ CalledGTNew = CalledGT#global_title{trans_type = 3},
+ CalledPartyNew = CalledParty#sccp_addr{global_title = CalledGTNew},
+ ParamsOut = lists:keyreplace(called_party_addr, 1, Opts,
+ {called_party_addr, CalledPartyNew}),
+ SccpDec#sccp_msg{parameters=ParamsOut};
+ _ ->
+ SccpDec
end;
- _ ->
+ _ ->
SccpDec
+ end;
+ _ ->
+ SccpDec
end;
mangle_tt_sri_sm(_, _, _, SccpIn) ->
SccpIn.