summaryrefslogtreecommitdiffstats
path: root/src/sccp_codec.erl
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-10-12 17:00:34 +0200
committerHarald Welte <laforge@gnumonks.org>2011-10-12 17:00:34 +0200
commit9c3b1bb25f37c0d9634a9460ac2d709ee81e20d6 (patch)
tree645597c8fb250b2a3d09912fe8991f42e38d753a /src/sccp_codec.erl
parent9bfab7c6f9d791bba830368077a7ff68cde3252b (diff)
sccp_codec: SCCP point codes are little-endian !
we parsed and generated them as big-endian so far, which is wrong.
Diffstat (limited to 'src/sccp_codec.erl')
-rw-r--r--src/sccp_codec.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sccp_codec.erl b/src/sccp_codec.erl
index 25ad05b..137812b 100644
--- a/src/sccp_codec.erl
+++ b/src/sccp_codec.erl
@@ -32,7 +32,7 @@
parse_point_code(BinPC, PCind) when is_binary(BinPC) ->
case PCind of
1 ->
- <<PointCode:16/big, Remain/binary>> = BinPC;
+ <<PointCode:16/little, Remain/binary>> = BinPC;
_ ->
Remain = BinPC,
PointCode = undef
@@ -272,7 +272,7 @@ encode_pc(PointCode) ->
undef ->
{0, <<>>};
_ ->
- {1, <<PointCode:16/big>>}
+ {1, <<PointCode:16/little>>}
end.
encode_ssn(SSN) ->