From 8b1bba0c46e6afdcd820c09ba8e432e447088854 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 6 Nov 2012 16:14:00 +0100 Subject: Fix broken doc link Broken in commit e28ced7b. --- lib/diameter/doc/src/diameter_app.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/diameter/doc/src/diameter_app.xml') diff --git a/lib/diameter/doc/src/diameter_app.xml b/lib/diameter/doc/src/diameter_app.xml index 9d8a6568eb..ac056c2d39 100644 --- a/lib/diameter/doc/src/diameter_app.xml +++ b/lib/diameter/doc/src/diameter_app.xml @@ -309,12 +309,12 @@ by either handle_answer/4 or handle_error/4 depending on whether or not an answer message is received from the peer. If the transport becomes unavailable after prepare_request/3 then a new prepare_request/3 then a new pick_peer/4 callback may take place to failover to an alternate peer, after which prepare_retransmit/3 takes the place of prepare_request/3 in resending the +marker="#prepare_request">prepare_request/3 in resending the request. There is no guarantee that a pick_peer/4 callback to select -- cgit v1.2.3 From 91a223d37d6b57f53d26135a4cbaf4ac22854ba2 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Thu, 15 Nov 2012 10:52:58 +0100 Subject: Allow a handle_request callback to return a #diameter_packet{} This allows it to set transport_data and header, inappropriately so even. --- lib/diameter/doc/src/diameter_app.xml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'lib/diameter/doc/src/diameter_app.xml') diff --git a/lib/diameter/doc/src/diameter_app.xml b/lib/diameter/doc/src/diameter_app.xml index ac056c2d39..b6870f7c28 100644 --- a/lib/diameter/doc/src/diameter_app.xml +++ b/lib/diameter/doc/src/diameter_app.xml @@ -382,7 +382,7 @@ communicate transport (or any other) data to the callback.

A returned packet() can set the header field to a -#diameter_header{} in order to specify values that should +#diameter_header{} to specify values that should be preserved in the outgoing request, values otherwise being those in the header record contained in Packet. A returned length, cmd_code or application_id is @@ -537,7 +537,8 @@ not selected.

| {relay, [Opt]} | discard | {eval|eval_packet, Action, PostF} -Reply = {reply, message()} +Reply = {reply, packet() + | message()} | {protocol_error, 3000..3999} Opt = diameter:call_opt() PostF = diameter:evaluable() @@ -568,7 +569,7 @@ The argument packet() has the following sign

-The msg field will be undefined only in case the request has +The msg field will be undefined in case the request has been received in the relay application. Otherwise it contains the record representing the request as outlined in The transport_data field contains an arbitrary term passed into diameter from the transport module in question, or the atom undefined if the transport specified no data. -The term is preserved in the packet() containing any answer message -sent back to the transport process unless another value is explicitly -specified.

+The term is preserved if a message() is returned but must be set +explicitly in a returned packet().

The semantics of each of the possible return values are as follows.

-{reply, message()} +{reply, packet() + | message()}

-Send the specified answer message to the peer.

+Send the specified answer message to the peer. +In the case of a packet(), the +message to be sent must be set in the +msg field and the header field can be set to a +#diameter_header{} to specify values that should be +preserved in the outgoing answer, appropriate values otherwise +being set by diameter.

{protocol_error, 3000..3999} -- cgit v1.2.3