From ae47958d67fab05a5ac24cd856f8b9675a4bee51 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 19 Jan 2012 23:17:50 +0100 Subject: m2pa_codec: use standard 'undefined' for not-present mtp3 portion --- src/m2pa_codec.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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) -> <> = 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>>; -- cgit v1.2.3