aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-02-28 08:52:02 +0100
committerBjörn Gustavsson <[email protected]>2013-05-31 14:52:16 +0200
commit649114be27c1893bb1624ec02e2948ae4a7332c7 (patch)
treefada5161ecb53737fe405fed771a0a71510aea59 /lib/asn1/src
parent1a891ebb4644ed7db9729b1659a21553d3431bfd (diff)
downloadotp-649114be27c1893bb1624ec02e2948ae4a7332c7.tar.gz
otp-649114be27c1893bb1624ec02e2948ae4a7332c7.tar.bz2
otp-649114be27c1893bb1624ec02e2948ae4a7332c7.zip
PER: Eliminate useless argument for encode_octet_string()
For what seems to be historical reasons, asn1_rtt_per:encode_octet_string/3 has an ExtensionMarker argument that is no longer used. The extension mark (if any) is included in the constraints argument.
Diffstat (limited to 'lib/asn1/src')
-rw-r--r--lib/asn1/src/asn1ct_gen_per_rt2ct.erl2
-rw-r--r--lib/asn1/src/asn1rtt_per.erl16
2 files changed, 8 insertions, 10 deletions
diff --git a/lib/asn1/src/asn1ct_gen_per_rt2ct.erl b/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
index b0b0b37d47..4eddba3150 100644
--- a/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
+++ b/lib/asn1/src/asn1ct_gen_per_rt2ct.erl
@@ -317,7 +317,7 @@ emit_enc_octet_string(Erules, Constraint, Value) ->
" end"]);
C ->
call(Erules, encode_octet_string,
- [{asis,C},false,Value])
+ [{asis,C},Value])
end.
emit_enc_integer_case(Value) ->
diff --git a/lib/asn1/src/asn1rtt_per.erl b/lib/asn1/src/asn1rtt_per.erl
index 1023be8ce1..b30a7aebd2 100644
--- a/lib/asn1/src/asn1rtt_per.erl
+++ b/lib/asn1/src/asn1rtt_per.erl
@@ -36,7 +36,7 @@
encode_VideotexString/2,
encode_ObjectDescriptor/2,
encode_UTF8String/1,
- encode_octet_string/3,
+ encode_octet_string/2,
encode_known_multiplier_string/4,
octets_to_complete/2]).
@@ -660,12 +660,10 @@ make_and_set_list([], _) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% X.691:16
-%% encode_octet_string(Constraint,ExtensionMarker,Val)
+%% encode_octet_string(Constraint, Val)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-encode_octet_string(_C, true, _Val) ->
- exit({error,{asn1,{'not_supported',extensionmarker}}});
-encode_octet_string({_,_}=SZ, false, Val) ->
+encode_octet_string({_,_}=SZ, Val) ->
Len = length(Val),
try
[encode_length(SZ, Len),2|octets_to_complete(Len, Val)]
@@ -673,7 +671,7 @@ encode_octet_string({_,_}=SZ, false, Val) ->
exit:{error,{asn1,{encode_length,_}}} ->
encode_fragmented_octet_string(Val)
end;
-encode_octet_string(SZ, false, Val) when is_list(SZ) ->
+encode_octet_string(SZ, Val) when is_list(SZ) ->
Len = length(Val),
try
[encode_length({hd(SZ),lists:max(SZ)},Len),2|
@@ -682,9 +680,9 @@ encode_octet_string(SZ, false, Val) when is_list(SZ) ->
exit:{error,{asn1,{encode_length,_}}} ->
encode_fragmented_octet_string(Val)
end;
-encode_octet_string(Sv, false, Val) when is_integer(Sv) ->
+encode_octet_string(Sv, Val) when is_integer(Sv) ->
encode_fragmented_octet_string(Val);
-encode_octet_string(no, false, Val) ->
+encode_octet_string(no, Val) ->
Len = length(Val),
try
[encode_length(Len),2|octets_to_complete(Len, Val)]
@@ -692,7 +690,7 @@ encode_octet_string(no, false, Val) ->
exit:{error,{asn1,{encode_length,_}}} ->
encode_fragmented_octet_string(Val)
end;
-encode_octet_string(C, _, _) ->
+encode_octet_string(C, _) ->
exit({error,{not_implemented,C}}).
encode_fragmented_octet_string(Val) ->