diff options
author | Anders Svensson <[email protected]> | 2015-03-24 11:01:36 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-03-24 11:01:36 +0100 |
commit | b7d8668ea5a4215da900bfcd2a1dbd51384cb0c7 (patch) | |
tree | 4b9900e8668867cfb94dce4d187b560828ab9134 /lib/diameter/src/base/diameter_config.erl | |
parent | bcecea772faea599ffd56776b1177865f08ca7b5 (diff) | |
parent | 949cec3fdcf94310aa567921ac2ea37569beb970 (diff) | |
download | otp-b7d8668ea5a4215da900bfcd2a1dbd51384cb0c7.tar.gz otp-b7d8668ea5a4215da900bfcd2a1dbd51384cb0c7.tar.bz2 otp-b7d8668ea5a4215da900bfcd2a1dbd51384cb0c7.zip |
Merge branch 'anders/diameter/string_decode/OTP-11952' into maint
* anders/diameter/string_decode/OTP-11952:
Let examples override default service options
Set {restrict_connections, false} in example server
Set {string_decode, false} in examples
Test {string_decode, false} in traffic suite
Add service_opt() string_decode
Strip potentially large terms when sending outgoing Diameter messages
Improve language consistency in diameter(1)
Diffstat (limited to 'lib/diameter/src/base/diameter_config.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_config.erl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/diameter/src/base/diameter_config.erl b/lib/diameter/src/base/diameter_config.erl index aa4d6e5a20..05e9ab88fd 100644 --- a/lib/diameter/src/base/diameter_config.erl +++ b/lib/diameter/src/base/diameter_config.erl @@ -644,13 +644,23 @@ make_config(SvcName, Opts) -> {false, monitor}, {?NOMASK, sequence}, {nodes, restrict_connections}, + {true, string_decode}, {[], spawn_opt}]), + D = proplists:get_value(string_decode, SvcOpts, true), + #service{name = SvcName, rec = #diameter_service{applications = Apps, - capabilities = Caps}, + capabilities = binary_caps(Caps, D)}, options = SvcOpts}. +binary_caps(Caps, true) -> + Caps; +binary_caps(Caps, false) -> + diameter_capx:binary_caps(Caps). + +%% make_opts/2 + make_opts(Opts, Defs) -> Known = [{K, get_opt(K, Opts, D)} || {D,K} <- Defs], Unknown = Opts -- Known, @@ -669,7 +679,8 @@ opt(K, false = B) opt(K, true = B) when K == share_peers; - K == use_shared_peers -> + K == use_shared_peers; + K == string_decode -> B; opt(restrict_connections, T) |