aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_check.erl
diff options
context:
space:
mode:
authorKenneth Lundin <[email protected]>2012-06-08 13:26:41 +0200
committerKenneth Lundin <[email protected]>2012-06-08 13:27:40 +0200
commitb4b4c6299d3926e55b042ea45f55adaeec41cb6f (patch)
tree23fb9c48a109397a4aa9bd68b70a07a6cd9cf086 /lib/asn1/src/asn1ct_check.erl
parent9cfeeb9b7e66a3345cbc0e5b4b634cb5965635fc (diff)
parentbe01ab6d2cad9d5b139b36c79b1c7addd57d5265 (diff)
downloadotp-b4b4c6299d3926e55b042ea45f55adaeec41cb6f.tar.gz
otp-b4b4c6299d3926e55b042ea45f55adaeec41cb6f.tar.bz2
otp-b4b4c6299d3926e55b042ea45f55adaeec41cb6f.zip
Merge branch 'kenneth/asn1/multiple_extaddgroup/OTP-10058' into maint
* kenneth/asn1/multiple_extaddgroup/OTP-10058: Add support for multiple ExtensionAdditionGroups
Diffstat (limited to 'lib/asn1/src/asn1ct_check.erl')
-rw-r--r--lib/asn1/src/asn1ct_check.erl20
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index 187339fb53..494a2eddd9 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -5991,17 +5991,25 @@ generate_automatic_tags1([H|T],[TagNo|TagNos]) when is_record(H,'ComponentType')
type={default,'IMPLICIT'},
form= 0 }]}, % PRIMITIVE
[H#'ComponentType'{typespec=NewTs}|generate_automatic_tags1(T,[TagNo+1|TagNos])];
-generate_automatic_tags1([ExtMark|T],[_TagNo|TagNos]) -> % EXTENSIONMARK
+generate_automatic_tags1([ExtMark = #'EXTENSIONMARK'{}|T],[_TagNo|TagNos]) ->
[ExtMark | generate_automatic_tags1(T,TagNos)];
+generate_automatic_tags1([H|T],TagList) -> % ExtensionAdditionGroup etc are just ignored
+ [H | generate_automatic_tags1(T,TagList)];
generate_automatic_tags1([],_) ->
[].
-any_manual_tag([#'ComponentType'{typespec=#type{tag=[]}}|Rest]) ->
- any_manual_tag(Rest);
-any_manual_tag([#'EXTENSIONMARK'{}|Rest]) ->
- any_manual_tag(Rest);
-any_manual_tag([_|_Rest]) ->
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Returns true if there is at least one ComponentType with a manually
+%% specified tag. No manual tag is indicated by typespec=#type{tag=[]}
+%% so we check if we find a tag =/= [] and return true in that case
+%% all other things in the componentlist like (EXTENSIONMARK,
+%% ExtensionAdditionGroup,...) except ComponentType is simply
+%% ignored/skipped
+any_manual_tag([#'ComponentType'{typespec=#type{tag=Tag}}|_Rest])
+ when Tag =/= []->
true;
+any_manual_tag([_|Rest]) ->
+ any_manual_tag(Rest);
any_manual_tag([]) ->
false.