Permalink
Browse files

Allow an answer to opt out of setting Result-Code/Failed-AVP

By returning it in a length 1 list from a handle_request callback.
This is the aforementioned roll your own.
  • Loading branch information...
1 parent 60fb617 commit de0cbe83cd96c17d75baf353e84c883b78980f98 Anders Svensson committed Aug 22, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/diameter/src/base/diameter_service.erl
@@ -1937,6 +1937,12 @@ is_loop(Code, Vid, OH, Avps) ->
%%
%% Send a locally originating reply.
+%% Skip the setting of Result-Code and Failed-AVP's below.
+reply([Msg], Dict, TPid, Pkt)
+ when is_list(Msg);
+ is_tuple(Msg) ->
+ reply(Msg, Dict, TPid, Pkt#diameter_packet{errors = []});
+
%% No errors or a diameter_header/avp list.
reply(Msg, Dict, TPid, #diameter_packet{errors = Es,
transport_data = TD}

0 comments on commit de0cbe8

Please sign in to comment.