aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-06-07 12:52:18 +0200
committerHarald Welte <laforge@gnumonks.org>2013-06-07 12:52:18 +0200
commitafcc0cf52f86c5cd89e4322e3b34091b5e386c5a (patch)
tree647ae8ef8ef2a730eea3db9d96ff2550538dbdf6
parentac6129b646b04cb6689e32ca6bcd14578770d8b1 (diff)
SCRC: make sure to forward UDTS as N-NOTICE.ind, not N-UNITDATA.ind
-rw-r--r--src/sccp_scrc.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/sccp_scrc.erl b/src/sccp_scrc.erl
index 116cb58..01833ba 100644
--- a/src/sccp_scrc.erl
+++ b/src/sccp_scrc.erl
@@ -46,6 +46,11 @@
}).
% TODO: Integrate with proper SCCP routing / GTT implementation
+is_notice(#sccp_msg{msg_type=?SCCP_MSGT_UDTS}) -> true;
+is_notice(#sccp_msg{msg_type=?SCCP_MSGT_XUDTS}) -> true;
+is_notice(#sccp_msg{msg_type=?SCCP_MSGT_LUDTS}) -> true;
+is_notice(_) -> false.
+
tx_prim_to_local_ref(Prim, LocalRef) ->
% determine the Pid to which the primitive must be sent
ConnTable = get(scoc_by_ref),
@@ -128,8 +133,12 @@ deliver_to_scoc_sclc(LoopDat, Msg, UserPid) when is_record(Msg, sccp_msg),
_ ->
% it would be more proper to send them via SCLC ??
%gen_fsm:send(sccp_sclc, ??
- % FIXME: N-NOTICE.ind for NOTICE
- UserPrim = osmo_util:make_prim('N','UNITDATA', indication, Msg),
+ case is_notice(Msg) of
+ true ->
+ UserPrim = osmo_util:make_prim('N','NOTICE', indication, Msg);
+ false ->
+ UserPrim = osmo_util:make_prim('N','UNITDATA', indication, Msg)
+ end,
UserPid ! {sccp, UserPrim}
end;
false ->