anchor.diff:  %% ---------------------------------------------------------------------------
   %% incr_error/4
   %% ---------------------------------------------------------------------------
  +
  +%% Identify messages using the application dictionary, not the encode
  +%% dictionary, which may differ in the case of answer-message.
  +incr_error(Dir, T, Pid, {_Dict, AppDict}) ->
  +    incr_error(Dir, T, Pid, AppDict);
   
   %% Decoded message without errors.
   incr_error(recv, #diameter_packet{errors = []}, _, _) ->
  
positive.code: %%    code, the missing vendor id, and a zero filled payload of the minimum
  %%    required length for the omitted AVP will be added.
  
  %% incr_rc/5
  %%
  %% Increment a stats counter for result codes in incoming and outgoing
  %% answers.
  
  %% Outgoing message as binary: don't count. (Sending binaries is only
  %% partially supported.)
  incr_rc(_, #diameter_packet{msg = undefined = No}, _, _, _) ->
      No;
  
  %% Incoming or outgoing. Outgoing with encode errors never gets here
  %% since encode fails.
  incr_rc(Dir, Pkt, Dict, TPid, Dict0) ->
      #diameter_packet{header = #diameter_header{is_error = E}
                              = Hdr,
                       msg = Msg,
                       errors = Es}
          = Pkt,
  
      Id = msg_id(Hdr, Dict),
  
      %% Count incoming decode errors.
      recv /= Dir orelse [] == Es orelse incr_error(Dir, Id, TPid, Dict),
  
      %% Exit on a missing result code.
      T = rc_counter(Dict, Msg),
  
negative.code: %% reply/5
  
  %% Local answer ...
  reply({Dict, Ans}, TPid, {AppDict, Dict0}, Fs, ReqPkt) ->
      local(Ans, TPid, {Dict, AppDict, Dict0}, Fs, ReqPkt);
  
  %% ... or relayed.
  reply(#diameter_packet{} = Pkt, TPid, _Dict0, Fs, _ReqPkt) ->
      eval_packet(Pkt, Fs),
      send(TPid, Pkt).
  
  %% local/5
  %%
  %% Send a locally originating reply.
  
  %% Skip the setting of Result-Code and Failed-AVP's below. This is
  %% undocumented and shouldn't be relied on.
  local([Msg], TPid, DictT, Fs, ReqPkt)
    when is_list(Msg);
         is_tuple(Msg) ->
      local(Msg, TPid, DictT, Fs, ReqPkt#diameter_packet{errors = []});
  
  local(Msg, TPid, {Dict, AppDict, Dict0} = DictT, Fs, ReqPkt) ->
      Pkt = encode({Dict, AppDict},
                   TPid,
                   reset(make_answer_packet(Msg, ReqPkt), Dict, Dict0),
                   Fs),
      incr(send, Pkt, TPid, AppDict),
      incr_result(send, Pkt, TPid, DictT),  %% count outgoing
      send(TPid, Pkt).
  
  %% reset/3
  