aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-06-13ssl: Correct epoch handlingIngela Anderton Andin
Consideration of which Epoch a message belongs to is needed in the dtls_connection:next_record function too.
2017-06-13vsn -> 2.0Anders Svensson
2017-06-13Update appup for 20.0Anders Svensson
2017-06-13Revert "kernel: Try mend disk_log whitebox tests"Rickard Green
This reverts commit 5d9bb41114544c9205a8b8f26642bad8231e8d4e.
2017-06-13Revert "erts: Do not generate atoms on old latin1 external format"Rickard Green
This reverts commit 65b04e233e09e3cc2e0fda3c28e155b95c5a4baf.
2017-06-13Let spawn_opt config replace erlang:spawn_opt/2 for request processesAnders Svensson
By accepting an MFA that is applied to the fun that is otherwise spawned for each incoming request, to allow handler processes to be reused. This is not yet documented and may change, but the motivation is to let spawn be replaced by process pool, from which the MFA selects. A list-valued spawn_opt is equivalent to {erlang, spawn_opt, [Opts]}.
2017-06-13Eliminate warnings for unused variablesBjörn Gustavsson
2017-06-13Remove unused functions in test emulator test suitesBjörn Gustavsson
2017-06-13Let candidate peers be passed to diameter:call/4Anders Svensson
To solve the problem of being able to send messages to a peer that hasn't advertised support for the application in question, as discussed in the parent commit. diameter:call/4 can be passed 'peer' options to identify candidates, and the only requirement is that an appropriate dictionary be configured for encode. Filters are applied as if candidates had been selected by advertised application.
2017-06-13Comment on RFC ambiguity regarding application identifiersAnders Svensson
It is tempting to regard remote support for the common application as implicit, but that leads to the problems noted, and a node could never then expect non-intersecting application support to result in 5010. It probably can't anyway given the different ways the RFC's intent can be interpreted, but it's not unreasonable that a node should be able to advertise a single Diameter application and get 5010 if the peer doesn't support it. The problem we have currently is that peer selection is based on the support advertised by the peer. The application id of an outgoing request is used to lookup peers that have advertised support, so if the peer hasn't advertised support for Diameter common messages then the user won't be able to send DPR and more: diameter:call/4 will just return {error, no_connection}. This commit doesn't solve the problem.
2017-06-13Remove trailing whitespaceAnders Svensson
2017-06-13Move (most of) diameter_gen.hrl to diameter_gen.erlAnders Svensson
To remove the requirement that dictionary modules be recompiled whenever the encode/decode implementation changes. The included diameter_gen.hrl now only contains trivial functions that call info diameter_gen.erl.
2017-06-13Change signature associated with dictionary @custom_type/@codecsAnders Svensson
To pass the options map through the encode. This is not backwards compatible, and dictionaries supporting @custom_types or @codecs will need to be updated.
2017-06-13Avoid sending answer terms between processes unnecessarilyAnders Svensson
As in commit fb14eac9, but for outgoing answers.
2017-06-13Refactor handling of incoming requestsAnders Svensson
To simplify the call chains and intermediate terms, that had become a little convoluted over time.
2017-06-13Restore diameter_codec:decode/2, update diameter_codec(3)Anders Svensson
The documentation has been out of date since the string_decode option was added in commit 1590920c. The optionless decode/2 was removed in the commit that removed the use of the process dictionary in decode.
2017-06-13Add diameter_codec option ordered_encodeAnders Svensson
To allow list-valued messaged to be encoded in the specified order, instead of in the dictionary order by first converting the list to a record. This is not yet exposed in configuration.
2017-06-13Restore undocumented Failed-AVP setting convenienceAnders Svensson
The parent commit removed the convenience of setting something like the following in the errors field of the diameter_packet of an answer message. [#diameter_avp{} = A2, {5001, #diameter_avp{} = A1}] This results in Result-Code = 5001 and Failed-AVP = [A1,A2], but is currently undocumented. Probably useful, so restore it. Also accept {RC, [#diameter_avp{}]} at encode, which is probably more useful; eg. [{5001, [A || {5001, A} <- Errors]}] Anyone who wants full control can set errors = false and formulate Result-Code/Failed-AVP themselves. (As opposed to not setting a value explicitly, which results in setting from the decoded errors list. A bit quirky, but documented and historical.)
2017-06-13Fix/simplify setting of one Failed-AVPAnders Svensson
When setting the Result-Code/Failed-AVP of an outgoing answer from an errors list either returned from or not discarded by a handle_request callback, more than the AVP paired with the Result-Code in question could be set in Failed-AVP. RFC 6733: 7.5. Failed-AVP AVP The Failed-AVP AVP (AVP Code 279) is of type Grouped and provides debugging information in cases where a request is rejected or not fully processed due to erroneous information in a specific AVP. The value of the Result-Code AVP will provide information on the reason for the Failed-AVP AVP. A Diameter answer message SHOULD contain an instance of the Failed-AVP AVP that corresponds to the error indicated by the Result-Code AVP. For practical purposes, this Failed-AVP would typically refer to the first AVP processing error that a Diameter node encounters.
2017-06-13Avoid recreating recordsAnders Svensson
In this case the diameter_packet of an answer message for encode. The record itself could be avoided, but that requires a new interface in diameter_codec, probably for little gain.
2017-06-13Avoid recreating recordsAnders Svensson
In the theme of the previous two commits, creating the required diameter_header of diameter_packet record only once.
2017-06-13Avoid recreating recordsAnders Svensson
As in the parent commit, recreating the options record is relatively costly.
2017-06-13Avoid recreating recordsAnders Svensson
This old construction is approximately two to four times slower from best (no elements modified) to worst (all modified) case, with the new construction having constant speed.
2017-06-13Adapt test suites to modified encode/decodeAnders Svensson
2017-06-13Simplify diameter_caps constructionAnders Svensson
Replace old macro-based implementation with something more readable.
2017-06-13Don't compute URI defaults unnecessarilyAnders Svensson
2017-06-13Don't deconstruct {TPid, Caps} unnecessarilyAnders Svensson
The tuple is returned from and passed to callbacks, so retain the tuple instead of its elements.
2017-06-13Remove use of process dictionary in decodeAnders Svensson
By passing additional arguments through it.
2017-06-13dialyzer: Run more of analyses in subprocessHans Bolinder
Memory consumption is marginally reduced.
2017-06-13dialyzer: Do not use two records for PLTsHans Bolinder
Instead of two records, #plt{} with dict:s and #mini_plt{} with ETS tables, one record is used for representing PLT:s in RAM. The #mini_plt{} is the one now used throughout analyses, but it is called #plt{}. When writing the PLT to file, another record is used, #file_plt{} (as before). When creating #file_plt{}, the #plt{} is deleted (it cannot be used for further analyses).
2017-06-13dialyzer: Improve compression of an ETS tableHans Bolinder
2017-06-13dialyzer: Minor optimizationsHans Bolinder
Avoid some ETS-lookups. Marginal speed-ups.
2017-06-13hipe: Remove 'undefined' from a record field's typeHans Bolinder
2017-06-13dialyzer: Warn about unused unknown typesHans Bolinder
2017-06-13hipe: Remove use of 'catch'Hans Bolinder
Substitute try/catch for an obsoletely used catch. Thanks to Kostis for pointing it out.
2017-06-13dialyzer: Correct a mistakeHans Bolinder
The arguments of calls to a debug function are no longer evaluated.
2017-06-13dialyzer: Rearrange some code to save memoryHans Bolinder
2017-06-13dialyzer: Optimize by avoiding some table lookupsHans Bolinder
In typesig: do not look up the module's types unless it is necessary.
2017-06-13hipe: Optimize contract decoration somewhatHans Bolinder
2017-06-13hipe: Correct a typespecHans Bolinder
2017-06-13v3_kernel: Keep orddicts sortedBjörn Gustavsson
2017-06-13sys_core_fold: Ensure that orddict keys are uniqueBjörn Gustavsson
All keys in an orddict must be unique. sys_core_fold:sub_sub_scope/1 broke that rule. It was probably harmless, but it is better to avoid such rule violations.
2017-06-13Merge branch 'ingela/ssl/dtls-doc'Ingela Anderton Andin
* ingela/ssl/dtls-doc: ssl: Document DTLS
2017-06-13Merge branch 'bjorn/asn1/fix-asn1rt-reference'Björn Gustavsson
* bjorn/asn1/fix-asn1rt-reference: Remove reference to removed module 'asn1rt'
2017-06-13Remove reference to removed module 'asn1rt'Björn Gustavsson
2017-06-13process_SUITE: Don't leave processes runningBjörn Gustavsson
2017-06-13trace_port_SUITE: Don't leave processes runningBjörn Gustavsson
2017-06-13tracer_SUITE: Don't leave processes runningBjörn Gustavsson
2017-06-13trace_nif_SUITE: Don't leave processes runningBjörn Gustavsson
2017-06-13trace_bif_SUITE: Don't leave processes runningBjörn Gustavsson