diff options
author | Anders Svensson <[email protected]> | 2015-03-25 06:27:05 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-03-26 08:08:40 +0100 |
commit | aaff5f36b836c65a72fb38a27e31a88d199a3155 (patch) | |
tree | 0b39e04089c785e4153da1fe74da8540802816b5 /lib/diameter | |
parent | a48186ef9de62ef412327bb4dafe7d50d9278f71 (diff) | |
download | otp-aaff5f36b836c65a72fb38a27e31a88d199a3155.tar.gz otp-aaff5f36b836c65a72fb38a27e31a88d199a3155.tar.bz2 otp-aaff5f36b836c65a72fb38a27e31a88d199a3155.zip |
Add guard to reject {spawn_opt, false} as transport/service_opt()
It was possible to configure the option, but doing so caused the service
to fail when starting a watchdog process:
{function_clause,
[{diameter_service,'-spawn_opts/1-lc$^0/1-0-',
[false],
[{file,"base/diameter_service.erl"},{line,846}]},
{diameter_service,start,5,
[{file,"base/diameter_service.erl"},{line,820}]},
{diameter_service,start,3,
[{file,"base/diameter_service.erl"},{line,782}]},
{diameter_service,handle_call,3,
[{file,"base/diameter_service.erl"},{line,385}]},
{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,607}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,639}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}
Tests for the option in the config suite were also missing.
Bungled in commit 78b3dc6.
Diffstat (limited to 'lib/diameter')
-rw-r--r-- | lib/diameter/src/base/diameter_config.erl | 6 | ||||
-rw-r--r-- | lib/diameter/test/diameter_config_SUITE.erl | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_config.erl b/lib/diameter/src/base/diameter_config.erl index 0d0304bf33..edfb91dbf4 100644 --- a/lib/diameter/src/base/diameter_config.erl +++ b/lib/diameter/src/base/diameter_config.erl @@ -675,7 +675,11 @@ opt(spawn_opt, L) L; opt(K, false = B) - when K /= sequence -> + when K == share_peers; + K == use_shared_peers; + K == monitor; + K == restrict_connections; + K == string_decode -> B; opt(K, true = B) diff --git a/lib/diameter/test/diameter_config_SUITE.erl b/lib/diameter/test/diameter_config_SUITE.erl index 77f7aace1b..ea77aa3716 100644 --- a/lib/diameter/test/diameter_config_SUITE.erl +++ b/lib/diameter/test/diameter_config_SUITE.erl @@ -85,6 +85,9 @@ {string_decode, [[true], [false]], [[0], [x]]}, + {spawn_opt, + [[[]], [[monitor, link]]], + [[false]]}, {invalid_option, %% invalid service options are rejected [], [[x], @@ -186,6 +189,9 @@ {private, [[x]], []}, + {spawn_opt, + [[[]], [[monitor, link]]], + [[false]]}, {invalid_option, %% invalid transport options are silently ignored [[x], [x,x]], |