anchor.diff:  -include("diameter_internal.hrl").
   
   %% Server state.
  --record(state, {id = diameter_lib:now()}).
  +-record(state, {id = diameter_lib:now(),
  +                role :: server | transport}).
   
   %% Registered name of the server.
   -define(SERVER, ?MODULE).
  
positive.code: %%% # handle_info/2
  %%% ----------------------------------------------------------
  
  %% A service process has died. This is most likely a consequence of
  %% stop_service, in which case the restart will find no config for the
  %% service and do nothing. The entry keyed on the monitor ref is only
  %% removed as a result of the 'DOWN' notification however.
  handle_info({'DOWN', MRef, process, _, Reason}, State) ->
      [#monitor{service = SvcName} = T] = select([{#monitor{mref = MRef,
                                                            _ = '_'},
                                                   [],
                                                   ['$_']}]),
      queue_restart(Reason, SvcName),
      delete_object(T),
      {noreply, State};
  
  handle_info({monitor, SvcName, Pid}, State) ->
      monitor(Pid, SvcName),
      {noreply, State};
  
  handle_info({restart, SvcName}, State) ->
      restart(SvcName),
      {noreply, State};
  
  handle_info(restart, State) ->
      restart(),
      {noreply, State};
  
  handle_info(Info, State) ->
      ?UNEXPECTED([Info]),
  
negative.code:          code_change/3]).
  
  %% callbacks
  -export([sync/1]).    %% diameter_sync requests
  
  %% debug
  -export([state/0,
  