aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-06-10 13:39:51 +0200
committerHarald Welte <laforge@gnumonks.org>2013-06-10 13:39:51 +0200
commitf6259f4ff4842e295f5111424a9eaf2be0b553b2 (patch)
treedf83630159b6a8bf2de744462bbe3f3f4d367cdb
parentafcc0cf52f86c5cd89e4322e3b34091b5e386c5a (diff)
osmo_sccp_tcap fixes
* Ignore + Print N-NOTICE.ind from SCCP * protocol_class is not always present from SCCP * use {debug, trace} when starting the gen_server
-rw-r--r--src/osmo_sccp_tcap.erl14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/osmo_sccp_tcap.erl b/src/osmo_sccp_tcap.erl
index 37fbb63..f3e954c 100644
--- a/src/osmo_sccp_tcap.erl
+++ b/src/osmo_sccp_tcap.erl
@@ -23,7 +23,7 @@
start_link(SSN) ->
Ourname = list_to_atom("sccp_ssn" ++ integer_to_list(SSN)),
- gen_server:start_link({local, Ourname}, ?MODULE, [SSN],[]).
+ gen_server:start_link({local, Ourname}, ?MODULE, [SSN],[{debug,trace}]).
init([SSN]) when is_integer(SSN) ->
init(SSN);
@@ -47,7 +47,8 @@ osmo_prim2signerl(#primitive{subsystem='N', gen_name='UNITDATA',
CalledAddr = proplists:get_value(called_party_addr, Params),
CallingAddr = proplists:get_value(calling_party_addr, Params),
UserData = proplists:get_value(user_data, Params),
- {PC, Opt} = proplists:get_value(protocol_class, Params),
+ % FIXME: doesn't always exist!
+ %{PC, Opt} = proplists:get_value(protocol_class, Params),
Rec = #'N-UNITDATA'{calledAddress = CalledAddr,
callingAddress = CallingAddr,
sequenceControl = undefined,
@@ -63,6 +64,15 @@ handle_info({sccp, P= #primitive{subsystem='N',
% this is really ugly, we need to make TCO understand #primitives
gen_server:cast(self(), osmo_prim2signerl(P)),
{noreply, State};
+handle_info({sccp, P= #primitive{subsystem='N',
+ gen_name='NOTICE',
+ spec_name=indication}}, State) ->
+ % this is really ugly, we need to make TCO understand #primitives
+ %gen_server:cast(self(), osmo_prim2signerl(P)),
+ error_logger:error_report(["unimplemented N-NOTICE.ind",
+ {module, ?MODULE},
+ {sccp, P}, {state, State}]),
+ {noreply, State};
handle_info(Info, State) ->
error_logger:error_report(["unknown handle_info",
{module, ?MODULE},