MTP3: OPC and DPC elements were switched
This commit is contained in:
parent
7ccc15e025
commit
0402b8f1ac
|
@ -45,7 +45,7 @@ parse_mtp3_routing_label(_, LabelBin) when is_binary(LabelBin) ->
|
||||||
% we need to swap the four bytes and then parse the fields
|
% we need to swap the four bytes and then parse the fields
|
||||||
<<Label32:32/little, Remain/binary>> = LabelBin,
|
<<Label32:32/little, Remain/binary>> = LabelBin,
|
||||||
LabelRev = <<Label32:32/big>>,
|
LabelRev = <<Label32:32/big>>,
|
||||||
<<Sls:4/big, Dpc:14/big, Opc:14/big>> = LabelRev,
|
<<Sls:4/big, Opc:14/big, Dpc:14/big>> = LabelRev,
|
||||||
{ok, #mtp3_routing_label{sig_link_sel = Sls, origin_pc = Opc, dest_pc = Dpc}, Remain}.
|
{ok, #mtp3_routing_label{sig_link_sel = Sls, origin_pc = Opc, dest_pc = Dpc}, Remain}.
|
||||||
|
|
||||||
parse_mtp3_msg(DataBin) when is_binary(DataBin) ->
|
parse_mtp3_msg(DataBin) when is_binary(DataBin) ->
|
||||||
|
@ -61,7 +61,7 @@ encode_mtp3_routing_label(#mtp3_routing_label{sig_link_sel = Sls, origin_pc = Op
|
||||||
Opc = osmo_util:pointcode2int(OpcIn),
|
Opc = osmo_util:pointcode2int(OpcIn),
|
||||||
Dpc = osmo_util:pointcode2int(DpcIn),
|
Dpc = osmo_util:pointcode2int(DpcIn),
|
||||||
% we need to swap the four bytes after encoding the fields
|
% we need to swap the four bytes after encoding the fields
|
||||||
<<Label32:32/little>> = <<Sls:4/big, Dpc:14/big, Opc:14/big>>,
|
<<Label32:32/little>> = <<Sls:4/big, Opc:14/big, Dpc:14/big>>,
|
||||||
<<Label32:32/big>>.
|
<<Label32:32/big>>.
|
||||||
|
|
||||||
encode_mtp3_msg(#mtp3_msg{network_ind = NetInd, service_ind = ServiceInd,
|
encode_mtp3_msg(#mtp3_msg{network_ind = NetInd, service_ind = ServiceInd,
|
||||||
|
|
Loading…
Reference in New Issue