From 45e356fb7b5d381a6e3c9ec83bf20fe9cefe8e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 2 Apr 2013 08:13:32 +0200 Subject: Don't lose the extension mark for object set parameters When an object set is an actual parameter, the extension marker for the object set could get lost. --- lib/asn1/test/asn1_SUITE_data/Param2.asn1 | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 lib/asn1/test/asn1_SUITE_data/Param2.asn1 (limited to 'lib/asn1/test/asn1_SUITE_data') diff --git a/lib/asn1/test/asn1_SUITE_data/Param2.asn1 b/lib/asn1/test/asn1_SUITE_data/Param2.asn1 new file mode 100644 index 0000000000..4393f875b6 --- /dev/null +++ b/lib/asn1/test/asn1_SUITE_data/Param2.asn1 @@ -0,0 +1,36 @@ +Param2 DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + + S1AP-PROTOCOL-IES ::= CLASS { + &id INTEGER UNIQUE, + &Value + } + WITH SYNTAX { + ID &id + TYPE &Value + } + + ProtocolIE-Field {S1AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id S1AP-PROTOCOL-IES.&id ({IEsSetParam}), + value S1AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) + } + + ProtocolIE-Container {S1AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (0..10)) OF ProtocolIE-Field {{IEsSetParam}} + + HandoverRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { HandoverRequiredIEs } }, + ... + } + + HandoverRequiredIEs S1AP-PROTOCOL-IES ::= { + { ID 1 TYPE OCTET STRING } | + { ID 2 TYPE INTEGER }, +--Delete-start + ..., + { ID 100 TYPE INTEGER (0..1023) } | + { ID 101 TYPE ENUMERATED {true,false} } +--Delete-end + } + +END -- cgit v1.2.3 From f7c7510b55efe6a1ab1133f47ec4c3b0371784e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 2 Apr 2013 13:39:50 +0200 Subject: Prevent loss of objects after the extension marker In an object set with a single root object, objects after the extension marker would be lost. --- lib/asn1/test/asn1_SUITE_data/Param2.asn1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/asn1/test/asn1_SUITE_data') diff --git a/lib/asn1/test/asn1_SUITE_data/Param2.asn1 b/lib/asn1/test/asn1_SUITE_data/Param2.asn1 index 4393f875b6..09ccb367d8 100644 --- a/lib/asn1/test/asn1_SUITE_data/Param2.asn1 +++ b/lib/asn1/test/asn1_SUITE_data/Param2.asn1 @@ -33,4 +33,16 @@ BEGIN --Delete-end } + SingleRoot ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { SingleRootIEs } }, + ... + } + + -- The extension was lost when there was a single root item. + SingleRootIEs S1AP-PROTOCOL-IES ::= { + { ID 1 TYPE OCTET STRING }, + ..., + { ID 2 TYPE INTEGER } + } + END -- cgit v1.2.3