anchor.diff:  %%% ---------------------------------------------------------------------------
   
   report_status(Status,
  -              #peer{ref = Ref,
  -                    conn = TPid,
  -                    type = Type,
  -                    options = Opts},
  -              #conn{apps = [_|_] = As,
  +              #watchdog{ref = Ref,
  +                        peer = TPid,
  +                        type = Type,
  +                        options = Opts},
  +              #peer{apps = [_|_] = As,
                       caps = Caps},
                 #state{service_name = SvcName}
                 = S,
  
positive.code: %%% # connection_down/3
  %%% ---------------------------------------------------------------------------
  
  connection_down(#peer{wd_state = ?WD_OKAY,
                        conn = TPid}
                  = P,
                  #conn{caps = Caps,
                        apps = SApps}
                  = C,
                  #state{service_name = SvcName,
                         service = #diameter_service{applications = Apps},
                         local_peers = LDict}
                  = S) ->
      report_status(down, P, C, S, []),
      remove_local_peer(SApps, {{TPid, Caps}, {SvcName, Apps}}, LDict),
      request_peer_down(TPid, S);
  
  connection_down(#peer{}, #conn{}, _) ->
      ok;
  
  connection_down(#peer{wd_state = WS,
                        conn = TPid}
                  = P,
                  To,
                  #state{peerT = PeerT,
                         connT = ConnT}
                  = S)
    when is_atom(To) ->
      insert(PeerT, P#peer{wd_state = To}),
      ?WD_OKAY == WS
          andalso
          connection_down(P, fetch(ConnT, TPid), S).
  
  remove_local_peer(SApps, T, LDict) ->
      lists:foldl(fun(A,D) -> rlp(A, T, D) end, LDict, SApps).
  
negative.code: %%% recv_request/3
  %%% ---------------------------------------------------------------------------
  
  recv_request(TPid, Pkt, {PeerT, SvcName, Apps, Mask}) ->
      try ets:lookup(PeerT, TPid) of
          [C] ->
              recv_request(C, TPid, Pkt, SvcName, Apps, Mask);
          [] ->             %% transport has gone down
  