Age | Commit message (Collapse) | Author |
|
Extract strict_arities once and pass it through as an argument.
|
|
Decode has previously been two passes: first chunk the message into a
reversed list of toplevel diameter_avp records, then fold through the
reversed list to build the full result. Various workarounds have made it
a bit more convoluted than it should be however. Rework it completely,
turning the previous 2-pass tail-recursive implementation into a 1-pass
body recursive one.
The relay decode still exists in diameter_codec, as a stripped down
version of the full decode in diameter_gen.
|
|
|
|
|
|
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).
|
|
As noted in the parent commit, the wrong AVPs were reported, being
counted from the back of the message instead of the front. Both 5005 and
5009 errors are now detected after the message is decoded.
|
|
Aka DIAMETER_AVP_OCCURS_TOO_MANY_TIMES.
This reveals a fault. The RFC says this:
A message was received that included an AVP that appeared more
often than permitted in the message definition. The Failed-AVP
AVP MUST be included and contain a copy of the first instance of
the offending AVP that exceeded the maximum number of occurrences.
The list of AVPs is reversed when diameter checks arities, so Failed-AVP
contains the wrong AVP, causing the new testcase to fail.
|
|
Stop counting when there can be no arity errors.
|
|
|
|
Since the number is now under 50K again. Also make testing of individual
groups or testcases easier.
|
|
Count as AVPs are encoded instead.
|
|
Use the same [MsgName | Avps] representation as for the list decode, but
with Avps a map instead of a AVP name/values list. As a result, don't
set the message/AVP name on an additional key in the map, which felt a
bit odd. Messages are [MsgName :: atom() | map()], Grouped AVPs are just
map().
Fix at least one problem in the traffic suite along the way: with
decode_format false, the own decode in to_map/2 didn't know whether or
not to decode strings, resulting on some failures.
|
|
For slightly better readability in the ct logs
|
|
To reduce the number of combinations tested, as in the parent commit.
|
|
To reduce the number of config combinations that are tested. The
encoding is the format in which messages are provided to diameter for
encode (to binary), and if there is any difference in the end result
then the peer will detect this at decode, independently of its encoding
format.
|
|
Undocumented, for transforming a map decode to record.
The record decode becomes more expensive the larger the number of AVPs
in the message definition in question, since the record is recreated
each time an AVP value is set in it. The map decode can potentially do
better.
|
|
{record_decode, map} is a bit too quirky.
|
|
One for each server decoding/encoding/container combination is overkill.
Just want a few from which one can be chosen in the pick_peer callback.
|
|
|
|
Instead of to lists, to simplify matching.
|
|
|
|
That is, decode to the same format that encode already accepts. Only a
message has its name at the head of the list since AVPs are already
name/value pairs.
|
|
With {record_decode, map}. The option name is arguably a bit misleading
now, but not too objectionable given that the encode/decode in question
has historically only been of records.
One advantage of the map decode is that the map only contains values for
those AVPs existing in the message or grouped AVP in question. The name
of the message or grouped AVP is stored in with key ':name', the leading
colon ensuring that the key isn't a diameter-name.
Decoding to maps makes the hrl files generated from dictionary files
largely irrelevant. There are value defines generated into these, but
they're typically so long as to be unusable.
|
|
To control whether or not messages and grouped AVPs are decoded to
records, in #diameter_packet.msg and #diameter_avp.value respectively.
The decode became unnecessary for diameter's needs in parent commit,
which decoupled it from the checking of AVP arities.
|
|
Instead of after, during the check that AVPs have sufficient arity.
This makes the arity checks independent of the record decode, which
will allow the latter to be made optional.
|
|
Most of the contents were moved to module diameter_gen in commit
205521d3.
|
|
Matched a byte instead of a bit, and increment/decrement wasn't
symmetric. Allow more requests since some requests timeout.
Bungled in commit 09089872.
|
|
Only exercising the standard dictionaries has missed some problems in
the past.
|
|
|
|
|
|
|
|
|
|
This fixes the missing updates after merge cdc5545536ddeedf9ae4db20464afa6565f4327d
whare the branch was rebased and merge after the previous copyright fix in
43718d3b81d7f3d08e25047e22d579801bbe5044
|
|
|
|
* siri/unicode-atoms/OTP-14285:
[sasl] Improve handling of unicode in rb
[ttb] Handle unicode atoms in trace data and config files
[dbg] Update default trace handler to print unicode atoms correctly
[etop] Fix handling of unicode atoms
[stdlib] Open sys debug logs as utf8
[stdlib] Open error log file as utf8
[sasl] Improve handling of unicode atoms
[ct] Print unicode atoms and strings correctly in common_test logs
|
|
|
|
|
|
|
|
Print function names and registered names with ~tw.
Open dump file with encoding utf8.
|
|
This allows the use of ~ts/~tp/~tw in the formatting fun to
sys:handle_debug/4.
|
|
This allows the use of ~ts/~tp/~tw in calls to error_logger:format/2,
error_logger:error_msg/2 and error_logger:info_msg/2.
|
|
|
|
And use correct encoding when printing to files.
|
|
* kenneth/OTP-14460:
Remove some ancient chapters which are no longer relevant
|
|
|
|
* rickard/ets-doc/OTP-14094:
Update documentation of ERL_MAX_ETS_TABLES
|
|
|
|
* anders/diameter/transport/ERL-332:
Fix sctp check in examples suite
|
|
|
|
To partake of the change in commit 69c5a741.
|