From 6c8fc1b7c2b5d01542893bfb37c892d365f30722 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 24 Oct 2015 01:00:48 +0200 Subject: Disable default values or they get omited --- acse.erl | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) (limited to 'acse.erl') diff --git a/acse.erl b/acse.erl index 4331686..4f852c7 100644 --- a/acse.erl +++ b/acse.erl @@ -2091,14 +2091,9 @@ end, {_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6, Cindex7, Cindex8, Cindex9, Cindex10, Cindex11, Cindex12, Cindex13, Cindex14} = Val, %%------------------------------------------------- -%% attribute protocol-version(1) with type BIT STRING DEFAULT = [version1] +%% attribute protocol-version(1) with type BIT STRING %%------------------------------------------------- - {EncBytes1,EncLen1} = case Cindex1 of - asn1_DEFAULT -> {<<>>,0}; - [version1] -> {<<>>,0}; - _ -> - encode_named_bit_string(Cindex1, [{version1,0}], [<<128>>]) - end, + {EncBytes1,EncLen1} = encode_named_bit_string(Cindex1, [{version1,0}], [<<128>>]), %%------------------------------------------------- %% attribute application-context-name(2) with type OBJECT IDENTIFIER @@ -2220,14 +2215,10 @@ encode_tags(TagIn, BytesSoFar, LenSoFar). Tlv1 = match_tags(Tlv, TagIn), %%------------------------------------------------- -%% attribute protocol-version(1) with type BIT STRING DEFAULT = [version1] +%% attribute protocol-version(1) with type BIT STRING %%------------------------------------------------- -{Term1,Tlv2} = case Tlv1 of -[{131072,V1}|TempTlv2] -> - {decode_named_bit_string(V1, [{version1,0}], []), TempTlv2}; - _ -> - {[version1],Tlv1} -end, +[V1|Tlv2] = Tlv1, +Term1 = decode_named_bit_string(V1, [{version1,0}], [131072]), %%------------------------------------------------- %% attribute application-context-name(2) with type OBJECT IDENTIFIER @@ -2372,14 +2363,9 @@ end, {_,Cindex1, Cindex2, Cindex3, Cindex4, Cindex5, Cindex6, Cindex7, Cindex8, Cindex9, Cindex10, Cindex11, Cindex12, Cindex13, Cindex14, Cindex15, Cindex16} = Val, %%------------------------------------------------- -%% attribute protocol-version(1) with type BIT STRING DEFAULT = [version1] +%% attribute protocol-version(1) with type BIT STRING %%------------------------------------------------- - {EncBytes1,EncLen1} = case Cindex1 of - asn1_DEFAULT -> {<<>>,0}; - [version1] -> {<<>>,0}; - _ -> - encode_named_bit_string(Cindex1, [{version1,0}], [<<128>>]) - end, + {EncBytes1,EncLen1} = encode_named_bit_string(Cindex1, [{version1,0}], [<<128>>]), %%------------------------------------------------- %% attribute application-context-name(2) with type OBJECT IDENTIFIER @@ -2527,14 +2513,10 @@ encode_tags(TagIn, BytesSoFar, LenSoFar). Tlv1 = match_tags(Tlv, TagIn), %%------------------------------------------------- -%% attribute protocol-version(1) with type BIT STRING DEFAULT = [version1] +%% attribute protocol-version(1) with type BIT STRING %%------------------------------------------------- -{Term1,Tlv2} = case Tlv1 of -[{131072,V1}|TempTlv2] -> - {decode_named_bit_string(V1, [{version1,0}], []), TempTlv2}; - _ -> - {[version1],Tlv1} -end, +[V1|Tlv2] = Tlv1, +Term1 = decode_named_bit_string(V1, [{version1,0}], [131072]), %%------------------------------------------------- %% attribute application-context-name(2) with type OBJECT IDENTIFIER -- cgit v1.2.3