<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/diameter/src/base, branch OTP_R16B</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Update appup for diameter-1.4.1 in R16B</title>
<updated>2013-02-18T18:22:59+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2013-02-13T13:45:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=f78ca174923bcbcdd3c4d2e899d1ddf93ff3ab58'/>
<id>f78ca174923bcbcdd3c4d2e899d1ddf93ff3ab58</id>
<content type='text'>
Also add comments to identify the corresponding OTP releases.
Purposely don't use regexp version numbers to be explicit about
previously released versions. (Could use them in one direction but then
app suite needs to be adapted.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also add comments to identify the corresponding OTP releases.
Purposely don't use regexp version numbers to be explicit about
previously released versions. (Could use them in one direction but then
app suite needs to be adapted.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Answer 5xxx errors with application_opt() request_errors = answer</title>
<updated>2013-02-17T02:26:07+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2013-02-16T00:14:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=1da8a27f08a890d3ba44ad9707b848ff8afbc1f5'/>
<id>1da8a27f08a890d3ba44ad9707b848ff8afbc1f5</id>
<content type='text'>
RFC 3588 allowed only 3xxx result codes in an answer-message (that is,
an answer that sets the E-bit) while RFC 6733 also allows 5xxx result
codes. Setting request_errors = answer tells diameter to answer 5xxx
errors itself. Returning {answer_message, integer()} from a
handle_request callback allows both 3xxx and 5xxx result codes to be
set. {protocol_error, integer()} is retained for 3xxx result codes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RFC 3588 allowed only 3xxx result codes in an answer-message (that is,
an answer that sets the E-bit) while RFC 6733 also allows 5xxx result
codes. Setting request_errors = answer tells diameter to answer 5xxx
errors itself. Returning {answer_message, integer()} from a
handle_request callback allows both 3xxx and 5xxx result codes to be
set. {protocol_error, integer()} is retained for 3xxx result codes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Comments and minor Result-Code fix</title>
<updated>2013-02-16T21:50:20+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2013-02-16T21:38:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=4d8afe10687f11e9e9796ba787a49c85f76082e9'/>
<id>4d8afe10687f11e9e9796ba787a49c85f76082e9</id>
<content type='text'>
In particular, don't put an error tuple in the errors field of
a #diameter_packet{} when Result-Code and the E-bit are in conflict, put
{integer(), #diameter_avp{}}.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In particular, don't put an error tuple in the errors field of
a #diameter_packet{} when Result-Code and the E-bit are in conflict, put
{integer(), #diameter_avp{}}.
</pre>
</div>
</content>
</entry>
<entry>
<title>Be less brutal in setting Result-Code/Failed-AVP</title>
<updated>2013-02-16T21:46:45+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2013-02-12T16:46:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=61b9efd8b4cf35dce44ec2fefd26339d2d20cb3c'/>
<id>61b9efd8b4cf35dce44ec2fefd26339d2d20cb3c</id>
<content type='text'>
When receiving a request for which errors have been detected during
decode, diameter previously used the errors list in the decoded
diameter_packet record to unconditionally set Result-Code and Failed-AVP
in the outgoing answer. It wasn't particularly delicate in doing so
however and would happily set a 5xxx Result-Code even if a
handle_request callback returned an answer-message, leading to an encode
error. This behaviour became even less endearing as of commit ac452e28,
which made it possible to handle_request to take place even for protocol
errors. (ie. When a callback typically should return an answer-message.)

This commit fixes the behaviour by only setting a value that's
appropriate for the answer in question, either a 3xxx or a 5xxx,
depending on if the answer's an answer-message or not. It also allows
handle_request to prevent diameter from setting anything by setting
errors = false in a returned diameter_packet. Ideally it should have
been errors = [] but the empty list is the default value for the errors
field and changing the default (ideally there shouldn't have been one)
would require recompilation of all modules including diameter.hrl:
choose the less attractive 'false' to avoid such backwards
incompatibility.

The request reception is also refactored somewhat to shorten some call
chains.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When receiving a request for which errors have been detected during
decode, diameter previously used the errors list in the decoded
diameter_packet record to unconditionally set Result-Code and Failed-AVP
in the outgoing answer. It wasn't particularly delicate in doing so
however and would happily set a 5xxx Result-Code even if a
handle_request callback returned an answer-message, leading to an encode
error. This behaviour became even less endearing as of commit ac452e28,
which made it possible to handle_request to take place even for protocol
errors. (ie. When a callback typically should return an answer-message.)

This commit fixes the behaviour by only setting a value that's
appropriate for the answer in question, either a 3xxx or a 5xxx,
depending on if the answer's an answer-message or not. It also allows
handle_request to prevent diameter from setting anything by setting
errors = false in a returned diameter_packet. Ideally it should have
been errors = [] but the empty list is the default value for the errors
field and changing the default (ideally there shouldn't have been one)
would require recompilation of all modules including diameter.hrl:
choose the less attractive 'false' to avoid such backwards
incompatibility.

The request reception is also refactored somewhat to shorten some call
chains.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add application_opt() request_errors</title>
<updated>2013-02-16T17:34:42+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2013-02-10T23:04:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=c9ca7f7e836dc6a4fe91fd4d7103af6d4db76f0e'/>
<id>c9ca7f7e836dc6a4fe91fd4d7103af6d4db76f0e</id>
<content type='text'>
Configuring the value 'callback' all errors detected in incoming
requests to result in a handle_request callback. The default value
'answer_3xxx' is the previous behaviour in which diameter answers
protocol errors without a callback.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Configuring the value 'callback' all errors detected in incoming
requests to result in a handle_request callback. The default value
'answer_3xxx' is the previous behaviour in which diameter answers
protocol errors without a callback.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add transport_opt() length_errors</title>
<updated>2013-02-11T17:55:16+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2013-02-08T23:59:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=5893043d862bdc4321b3dba439d70d178af60a22'/>
<id>5893043d862bdc4321b3dba439d70d178af60a22</id>
<content type='text'>
The value determines whether or not an unexpected message length in the
header of an incoming messages causes the peer process to exit, the
message to be discarded or handled as usual. The latter may only be
appropriate for message-oriented transport (eg. SCTP) since
stream-oriented transport (eg. TCP) may not be able to recover the
message boundary once a length error has occurred.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The value determines whether or not an unexpected message length in the
header of an incoming messages causes the peer process to exit, the
message to be discarded or handled as usual. The latter may only be
appropriate for message-oriented transport (eg. SCTP) since
stream-oriented transport (eg. TCP) may not be able to recover the
message boundary once a length error has occurred.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove trailing whitespace</title>
<updated>2013-02-08T18:28:47+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2013-02-08T01:25:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=05a6cc1c996acb8e8dfe168cb029b2a7a4fdbc3d'/>
<id>05a6cc1c996acb8e8dfe168cb029b2a7a4fdbc3d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tweak service interface towards diameter_peer</title>
<updated>2013-02-08T18:28:47+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2013-02-08T00:38:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=63d57f401e9e9a8ed376934581f42793d00e32cc'/>
<id>63d57f401e9e9a8ed376934581f42793d00e32cc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Split message handling in diameter_service into diameter_traffic</title>
<updated>2013-02-08T18:28:47+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2013-02-06T17:24:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=e49e7acc2af99bbd06fa028168f9e1549cc5c658'/>
<id>e49e7acc2af99bbd06fa028168f9e1549cc5c658</id>
<content type='text'>
Traffic handling is connected to the service implementation through the
pick_peer callback and failover but diameter_service was getting
unwieldy as home to both the service process and traffic handling.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Traffic handling is connected to the service implementation through the
pick_peer callback and failover but diameter_service was getting
unwieldy as home to both the service process and traffic handling.
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify request record</title>
<updated>2013-02-08T18:28:47+00:00</updated>
<author>
<name>Anders Svensson</name>
<email>anders@erlang.org</email>
</author>
<published>2013-02-04T22:59:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=1e6f879d41fd023f815609268447e763a9206396'/>
<id>1e6f879d41fd023f815609268447e763a9206396</id>
<content type='text'>
In particular, remove fields containing values that are known (as of the
preceding commit) to the request process.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In particular, remove fields containing values that are known (as of the
preceding commit) to the request process.
</pre>
</div>
</content>
</entry>
</feed>
