diff options
author | Björn Gustavsson <[email protected]> | 2012-12-04 07:23:15 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-12-06 14:22:37 +0100 |
commit | b38a42c5eacceee57333e26948216d199c123e84 (patch) | |
tree | 27d2dab58bf90738ab3d7415df45d837f8725035 /lib/asn1/src/asn1ct_gen_per_rt2ct.erl | |
parent | 9f83121db1cea3f9b3a8f87435b1767285556ab6 (diff) | |
download | otp-b38a42c5eacceee57333e26948216d199c123e84.tar.gz otp-b38a42c5eacceee57333e26948216d199c123e84.tar.bz2 otp-b38a42c5eacceee57333e26948216d199c123e84.zip |
Optimize decoding of OCTET STRINGs
Decoding of fragmented OCTET STRINGs was only implemented when the size
was constrained to a single value. While at it, support decoding
fragmented OCTET STRINGS in all circumstances.
Diffstat (limited to 'lib/asn1/src/asn1ct_gen_per_rt2ct.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_gen_per_rt2ct.erl | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per_rt2ct.erl b/lib/asn1/src/asn1ct_gen_per_rt2ct.erl index 00faa805e5..ecd212c3e3 100644 --- a/lib/asn1/src/asn1ct_gen_per_rt2ct.erl +++ b/lib/asn1/src/asn1ct_gen_per_rt2ct.erl @@ -450,17 +450,6 @@ emit_enc_octet_string(_Erules,Constraint,Value) -> emit({" ?RT_PER:encode_octet_string(",{asis,C},",false,",Value,")",nl}) end. -emit_dec_octet_string(Constraint,BytesVar) -> - case get_constraint(Constraint,'SizeConstraint') of - 0 -> - emit({" {[],",BytesVar,"}",nl}); - {_,0} -> - emit({" {[],",BytesVar,"}",nl}); - C -> - emit({" ?RT_PER:decode_octet_string(",BytesVar,",", - {asis,C},",false)",nl}) - end. - emit_enc_integer_case(Value) -> case get(component_type) of {true,#'ComponentType'{prop=Prop}} -> @@ -1543,7 +1532,7 @@ gen_dec_prim(Erules,Att,BytesVar) -> asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); 'OCTET STRING' -> - emit_dec_octet_string(Constraint,BytesVar); + asn1ct_gen_per:gen_dec_prim(Erules, Att, BytesVar); 'NumericString' -> emit_dec_known_multiplier_string('NumericString', |