summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-04-01 19:03:31 +0200
committerHarald Welte <laforge@gnumonks.org>2012-04-01 19:03:31 +0200
commit7aff8fb62be1422016ec92df5d1cbec0c738b75c (patch)
tree222f83badf754488340c5eca82b138a63a243b07
parentbd63ade9805e93901ff07879fb03f44290b67d68 (diff)
sua_codec: rename generic part from sua -> xua
-rw-r--r--src/sua_codec.erl8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/sua_codec.erl b/src/sua_codec.erl
index 9e2e203..ee7830c 100644
--- a/src/sua_codec.erl
+++ b/src/sua_codec.erl
@@ -58,8 +58,6 @@ parse_xua_opts(OptBin, OptList) when is_binary(OptBin), is_list(OptList) ->
NewOpt = {Tag, {Length, Value}},
parse_xua_opts(NextOpts, OptList ++ [NewOpt]).
-parse_sua_opt(Opt, Msg) ->
- {Opt, Msg}.
encode_msg(#sua_msg{version = Version, msg_class = MsgClass,
@@ -74,14 +72,14 @@ encode_xua_opts(OptList) when is_list(OptList) ->
encode_xua_opts([], Bin) ->
Bin;
encode_xua_opts([{Iei, Attr}|Tail], Bin) ->
- OptBin = encode_sua_opt(Iei, Attr),
+ OptBin = encode_xua_opt(Iei, Attr),
encode_xua_opts(Tail, <<Bin/binary, OptBin/binary>>).
-encode_sua_opt(Iei, {LenIn, Data}) when is_integer(Iei), is_binary(Data) ->
+encode_xua_opt(Iei, {LenIn, Data}) when is_integer(Iei), is_binary(Data) ->
Length = LenIn + 4,
PadLen = get_num_pad_bytes(Length),
<<Iei:16/big, Length:16/big, Data/binary, 0:PadLen/integer-unit:8>>;
-encode_sua_opt(Iei, Data) when is_integer(Iei), is_binary(Data) ->
+encode_xua_opt(Iei, Data) when is_integer(Iei), is_binary(Data) ->
Length = byte_size(Data) + 4,
PadLen = get_num_pad_bytes(Length),
<<Iei:16/big, Length:16/big, Data/binary, 0:PadLen/integer-unit:8>>.