summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-12-08 14:09:34 +0100
committerHarald Welte <laforge@gnumonks.org>2011-12-08 14:09:34 +0100
commit9b5ea3e612c5c6caf2d4dd0855fdf285e39f9d6a (patch)
treeafefc40bf2367620b3f789510abc5cd5e229616d
parent4608ba17792f70b9028cab84e576cd287be69786 (diff)
ss7_links: add mtp3_tx/2 variant to trnasmit to given linkset
this doesn't resolve the Linkset based on Dpc/SLS, but on the caller-specified linkset name.
-rw-r--r--src/ss7_links.erl17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/ss7_links.erl b/src/ss7_links.erl
index da6f790..e873db3 100644
--- a/src/ss7_links.erl
+++ b/src/ss7_links.erl
@@ -35,7 +35,8 @@
-export([register_link/3, unregister_link/2, set_link_state/3]).
-export([bind_service/2, unbind_service/1]).
--export([get_pid_for_link/2, get_pid_for_dpc_sls/2, mtp3_tx/1,
+-export([get_pid_for_link/2, get_pid_for_dpc_sls/2,
+ mtp3_tx/1, mtp3_tx/2,
get_linkset_for_dpc/1, get_opc_for_linkset/1, is_pc_local/1,
get_user_pid_for_service/1, mtp3_rx/1, dump/0]).
@@ -194,6 +195,20 @@ mtp3_rx(P = #primitive{parameters=#mtp3_msg{service_ind=Serv}}) ->
% transmit a MTP3 message via any of the avaliable links for the DPC
+mtp3_tx(Mtp3 = #mtp3_msg{routing_label = RoutLbl}, Link) ->
+ #mtp3_routing_label{sig_link_sel = Sls} = RoutLbl,
+ % discover the link through which we shall send
+ case get_pid_for_link(Link, Sls) of
+ {error, Error} ->
+ {error, Error};
+ {ok, Pid} ->
+ gen_server:cast(Pid,
+ osmo_util:make_prim('MTP', 'TRANSFER',
+ request, Mtp3))
+ end.
+
+
+% transmit a MTP3 message via any of the avaliable links for the DPC
mtp3_tx(Mtp3 = #mtp3_msg{routing_label = RoutLbl}) ->
#mtp3_routing_label{dest_pc = Dpc, sig_link_sel = Sls} = RoutLbl,
% discover the link through which we shall send