summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-19 23:17:50 +0100
committerHarald Welte <laforge@gnumonks.org>2012-01-19 23:17:50 +0100
commitae47958d67fab05a5ac24cd856f8b9675a4bee51 (patch)
tree7e35c9a8ba5a75df126c63734b756bf017723c90
parent23a45c1694fd2313eebf0c7f3f5060c2ea4ecd9e (diff)
m2pa_codec: use standard 'undefined' for not-present mtp3 portion
-rw-r--r--src/m2pa_codec.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/m2pa_codec.erl b/src/m2pa_codec.erl
index 71caf7c..1eeb5f9 100644
--- a/src/m2pa_codec.erl
+++ b/src/m2pa_codec.erl
@@ -37,7 +37,7 @@ parse_m2pa_msgt(?M2PA_CLASS_M2PA, ?M2PA_TYPE_LINK, Len, Remain) ->
{undefined, Ret}
end;
parse_m2pa_msgt(?M2PA_CLASS_M2PA, ?M2PA_TYPE_USER, 16, <<>>) ->
- {empty, []};
+ {undefined, []};
parse_m2pa_msgt(?M2PA_CLASS_M2PA, ?M2PA_TYPE_USER, Len, RemainIn) ->
<<Pri:1, _:7, Mtp3Bin/binary>> = RemainIn,
Mtp3 = mtp3_codec:parse_mtp3_msg(Mtp3Bin),
@@ -51,7 +51,7 @@ parse_msg(DataBin) when is_binary(DataBin) ->
fwd_seq_nr = FSN, back_seq_nr = BSN,
mtp3 = Mtp3, parameters = Params}}.
-encode_m2pa_msgt(?M2PA_CLASS_M2PA, ?M2PA_TYPE_USER, empty, _Params) ->
+encode_m2pa_msgt(?M2PA_CLASS_M2PA, ?M2PA_TYPE_USER, undefined, _Params) ->
<<>>;
encode_m2pa_msgt(?M2PA_CLASS_M2PA, ?M2PA_TYPE_USER, Mtp3, _Params) when is_binary(Mtp3) ->
<<0:1, 0:7, Mtp3/binary>>;