aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_service.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-07-13 01:09:57 +0200
committerAnders Svensson <[email protected]>2017-08-03 17:16:34 +0200
commit66bb5251e89487c5fb8c1f10b8ceb2c6c8f31eed (patch)
treef491e3ebbb78135006ccacad3ccaff13719206aa /lib/diameter/src/base/diameter_service.erl
parentdf5814ace0461c37389d96e87ef8aae297802b2e (diff)
downloadotp-66bb5251e89487c5fb8c1f10b8ceb2c6c8f31eed.tar.gz
otp-66bb5251e89487c5fb8c1f10b8ceb2c6c8f31eed.tar.bz2
otp-66bb5251e89487c5fb8c1f10b8ceb2c6c8f31eed.zip
Add service_opt() strict_arities
To be able to disable the relatively expensive check that the number of AVPs received in a message or grouped AVP agrees with the dictionary in question. The may well be easier for the user in handle_request/answer callbacks, when digesting the received message, and in some cases may not be important. The check at encode can also be disabled, allowing messages that don't agree with the dictionary in question to be sent, which can be useful in test (at least).
Diffstat (limited to 'lib/diameter/src/base/diameter_service.erl')
-rw-r--r--lib/diameter/src/base/diameter_service.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 43be4d889a..c3c3c4b0e7 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -112,6 +112,7 @@
use_shared_peers := diameter:remotes(),%% use from
restrict_connections := diameter:restriction(),
incoming_maxlen := diameter:message_length(),
+ strict_arities => diameter:strict_arities(),
strict_mbit := boolean(),
decode_format := diameter:decode_format(),
string_decode := boolean(),
@@ -701,7 +702,7 @@ init_peers() ->
%% TPid}
service_options(Opts) ->
- maps:from_list(Opts).
+ maps:from_list(lists:delete({strict_arities, true}, Opts)).
mref(false = No) ->
No;