aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_codec.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-09-14 23:41:46 +0200
committerAnders Svensson <[email protected]>2015-09-14 23:41:46 +0200
commita8d17f7e69e853d1bc858e72dc9daf6beed30f19 (patch)
tree945fdac18a607297ad7fd834dd2a1d1b0e1a936c /lib/diameter/src/base/diameter_codec.erl
parent44a53a37f39e65c935ed2648ec74dc0f741611e1 (diff)
parent502189ba42469d3332bc0658caa2bd0de1e3fcb9 (diff)
downloadotp-a8d17f7e69e853d1bc858e72dc9daf6beed30f19.tar.gz
otp-a8d17f7e69e853d1bc858e72dc9daf6beed30f19.tar.bz2
otp-a8d17f7e69e853d1bc858e72dc9daf6beed30f19.zip
Merge branch 'anders/diameter/M-bit/OTP-12947' into maint
* anders/diameter/M-bit/OTP-12947: Add service_opt() strict_mbit
Diffstat (limited to 'lib/diameter/src/base/diameter_codec.erl')
-rw-r--r--lib/diameter/src/base/diameter_codec.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/diameter/src/base/diameter_codec.erl b/lib/diameter/src/base/diameter_codec.erl
index bcdc5b3005..1ea5357924 100644
--- a/lib/diameter/src/base/diameter_codec.erl
+++ b/lib/diameter/src/base/diameter_codec.erl
@@ -77,9 +77,10 @@ setopts(Opts)
when is_list(Opts) ->
lists:foreach(fun setopt/1, Opts).
-%% Decode stringish types to string()? The default true is for
-%% backwards compatibility.
-setopt({string_decode = K, false = B}) ->
+%% The default string_decode true is for backwards compatibility.
+setopt({K, false = B})
+ when K == string_decode;
+ K == strict_mbit ->
setopt(K, B);
%% Regard anything but the generated RFC 3588 dictionary as modern.
@@ -97,7 +98,8 @@ setopt(Key, Value) ->
getopt(Key) ->
case get({diameter, Key}) of
- undefined when Key == string_decode ->
+ undefined when Key == string_decode;
+ Key == strict_mbit ->
true;
undefined when Key == rfc ->
6733;