diff options
author | Anders Svensson <[email protected]> | 2017-07-13 01:09:57 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-08-03 17:16:34 +0200 |
commit | 66bb5251e89487c5fb8c1f10b8ceb2c6c8f31eed (patch) | |
tree | f491e3ebbb78135006ccacad3ccaff13719206aa /lib/diameter/src/base/diameter.erl | |
parent | df5814ace0461c37389d96e87ef8aae297802b2e (diff) | |
download | otp-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.erl')
-rw-r--r-- | lib/diameter/src/base/diameter.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/diameter/src/base/diameter.erl b/lib/diameter/src/base/diameter.erl index 85a54c8e61..c919ff4c93 100644 --- a/lib/diameter/src/base/diameter.erl +++ b/lib/diameter/src/base/diameter.erl @@ -48,6 +48,7 @@ -export_type([evaluable/0, decode_format/0, + strict_arities/0, restriction/0, message_length/0, remotes/0, @@ -338,6 +339,11 @@ call(SvcName, App, Message) -> | false | record_from_map. +-type strict_arities() + :: false + | encode + | decode. + %% Options passed to start_service/2 -type service_opt() @@ -348,6 +354,7 @@ call(SvcName, App, Message) -> | {share_peers, remotes()} | {decode_format, decode_format()} | {string_decode, boolean()} + | {strict_arities, true | strict_arities()} | {strict_mbit, boolean()} | {incoming_maxlen, message_length()} | {use_shared_peers, remotes()} |