anchor.diff:  	ThisTarget ->
   	    %% By matching on ClientPid here, we make sure we got the signal from
   	    %% the right process. XXX handle wrong pid more gracefully than crashing!
  -	    [ClientPid, ResponseToRequest] = targetlist:extract([pid, request], ThisTarget),
  +	    [ClientPid, ResponseToRequest, OldTState] = targetlist:extract([pid, request, state], ThisTarget),
   	    {RMethod, RURI} = {ResponseToRequest#request.method, ResponseToRequest#request.uri},
   	    NewTarget1 = targetlist:set_state(ThisTarget, NewTState),
   	    NewTarget2 = targetlist:set_endresult(NewTarget1, SPResponse),	% XXX only do this for final responses?
  
positive.code: %%--------------------------------------------------------------------
  process_signal({cancel_pending}, State) when is_record(State, state) ->
      Targets = State#state.targets,
      logger:log(debug, "sipproxy: process_wait() received 'cancel_pending', calling cancel_pending_targets()"),
      NewTargets = cancel_pending_targets(Targets),
      %% If mystate is 'calling', we need to set it to 'cancelled' to prevent us from
      %% starting new transactions for additional destinations if we were to receive
  
negative.code: %%           exit (hard) ourselves. This will cause the EXIT signal to
  %%           be propagated to our client branches, which will CANCEL
  %%           themselves if they are not already completed.
  %% Returns : {stop, normal, State} |
  %%           does not return
  %%--------------------------------------------------------------------
  %%
  %% final_response_sent == 'true' or mystate /= 'calling'
  %%
  process_signal({'EXIT', Pid, normal}, #state{parent=Parent, final_response_sent=FRS,
  					    mystate=MyState}=State)
    when Pid == Parent, FRS == true; MyState /= calling ->
      %% Parent exited when we are finishing up. This is considered normal, so we just exit too.
      {stop, normal, State};
  
  %%
  %% final_response_sent == 'false', or mystate is 'calling'
  %%
  process_signal({'EXIT', Pid, Reason}, #state{parent=Parent}) when Pid == Parent ->
      %% Our parent has exited on us, either abnormally or before we sent a final response.
      %% Exit straight away since there is no point in us staying alive. The client branches
      %% are linked to this process, and will cancel themselves when we exit, if they need to.
      logger:log(error, "sipproxy: My parent just exited, so I will too (with error 'sipproxy_parent_died')."),
      logger:log(debug, "sipproxy: Parents (~p) exit-reason : ~p", [Parent, Reason]),
      erlang:exit(sipproxy_parent_died);
  
  %%--------------------------------------------------------------------
  