diff options
author | Anders Svensson <[email protected]> | 2017-08-31 09:53:45 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-09-01 17:22:36 +0200 |
commit | 36a64980960077558dcfd0e181a65753856f331c (patch) | |
tree | ccdb00043e8e2d9507062be8ee1313372b60df60 /lib/diameter/src/base | |
parent | 99db256e992591ab5cd03d77adcd4ad8d8a16a7e (diff) | |
download | otp-36a64980960077558dcfd0e181a65753856f331c.tar.gz otp-36a64980960077558dcfd0e181a65753856f331c.tar.bz2 otp-36a64980960077558dcfd0e181a65753856f331c.zip |
Rename decode_format false to none
Which reads better and makes it easier to distinguish this false from
others.
Diffstat (limited to 'lib/diameter/src/base')
-rw-r--r-- | lib/diameter/src/base/diameter.erl | 2 | ||||
-rw-r--r-- | lib/diameter/src/base/diameter_config.erl | 4 | ||||
-rw-r--r-- | lib/diameter/src/base/diameter_gen.erl | 11 | ||||
-rw-r--r-- | lib/diameter/src/base/diameter_watchdog.erl | 4 |
4 files changed, 11 insertions, 10 deletions
diff --git a/lib/diameter/src/base/diameter.erl b/lib/diameter/src/base/diameter.erl index 3b41feac0d..69ef6f4ec0 100644 --- a/lib/diameter/src/base/diameter.erl +++ b/lib/diameter/src/base/diameter.erl @@ -340,7 +340,7 @@ call(SvcName, App, Message) -> :: record | list | map - | false + | none | record_from_map. -type strict_arities() diff --git a/lib/diameter/src/base/diameter_config.erl b/lib/diameter/src/base/diameter_config.erl index 6fc4277ac8..284f885884 100644 --- a/lib/diameter/src/base/diameter_config.erl +++ b/lib/diameter/src/base/diameter_config.erl @@ -588,8 +588,7 @@ opt(service, {K, false}) K == use_shared_peers; K == monitor; K == restrict_connections; - K == strict_arities; - K == decode_format -> + K == strict_arities -> true; opt(service, {K, true}) @@ -602,6 +601,7 @@ opt(service, {decode_format, T}) when T == record; T == list; T == map; + T == none; T == record_from_map -> true; diff --git a/lib/diameter/src/base/diameter_gen.erl b/lib/diameter/src/base/diameter_gen.erl index e8f637dd53..0aea982a54 100644 --- a/lib/diameter/src/base/diameter_gen.erl +++ b/lib/diameter/src/base/diameter_gen.erl @@ -527,7 +527,7 @@ decode1(Data, Name, {AvpName, Type}, Mod, Fmt, Opts, Avp) -> %% set/4 -set('Grouped', false, Avp, V) -> +set('Grouped', none, Avp, V) -> {_Rec, As} = V, [Avp | As]; @@ -542,7 +542,7 @@ set(_, _, Avp, V) -> %% %% Error when decoding a grouped AVP. -decode_error(true, false, _, Avp) -> +decode_error(true, none, _, Avp) -> Avp; decode_error(true, _, {Rec, _, _}, Avp) -> @@ -735,8 +735,9 @@ pack(Arity, F, Avp, Mod, [Failed | Rec]) -> %% set/5 -set(_, _, _, _, false = No) -> - No; +set(_, _, _, _, None) + when is_atom(None) -> + None; set(1, F, Value, _, Map) when is_map(Map) -> @@ -830,7 +831,7 @@ empty(Name, #{module := Mod} = Opts) -> %% newrec/4 -newrec(false, _, Name, _) -> +newrec(none, _, Name, _) -> Name; newrec(record, Mod, Name, T) diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl index bb671e9860..c08e2da672 100644 --- a/lib/diameter/src/base/diameter_watchdog.erl +++ b/lib/diameter/src/base/diameter_watchdog.erl @@ -72,7 +72,7 @@ restrict := boolean(), suspect := non_neg_integer(), %% OKAY -> SUSPECT okay := non_neg_integer()}, %% REOPEN -> OKAY - codec :: #{decode_format := false, + codec :: #{decode_format := none, string_decode := false, strict_arities => diameter:strict_arities(), strict_mbit := boolean(), @@ -157,7 +157,7 @@ i({Ack, T, Pid, {Opts, string_decode, rfc, ordered_encode], - SvcOpts#{decode_format := false, + SvcOpts#{decode_format := none, string_decode := false, ordered_encode => false})}. |