anchor.diff:                  refs = []
                  }).
   
  --export([start_link/0, start_link/1,
  +-export([start_link/0,
  +         start_link/1,
            register_service/2,
            unregister_service/1,
  +         sync_register_service/2,
  +         sync_unregister_service/1,
            is_registered/1,
            register_stats_fun/1,
            get_stats/0,
  
positive.code:                                 ?MODULE, SubProtocols),
      lager:info("Service manager: listening on ~s:~p", [IP, Port]),
      {ok, Pid}.
  
negative.code:     PStats = [{Protocol, Count} || {Protocol,{_Stats,Count}} <- Stats],
      {reply, PStats, State};
  
  handle_call({register_service, Protocol, Strategy},  _From, State) ->
      NewDict = handle_register_service(Protocol,
                                        Strategy,
                                        State#state.services),
      {reply, ok, State#state{services=NewDict}};
  
  handle_call({unregister_service, ProtocolId}, _From, State) ->
      NewDict = handle_unregister_service(ProtocolId, State#state.services),
      {reply, ok, State#state{services=NewDict}};
  
  handle_call(_Unhandled, _From, State) ->
      ?TRACE(?debugFmt("Unhandled gen_server call: ~p", [_Unhandled])),
      {reply, {error, unhandled}, State}.
  
  handle_cast({register_service, Protocol, Strategy}, State) ->
      NewDict = handle_register_service(Protocol,
                                        Strategy,
                                        State#state.services),
      {noreply, State#state{services=NewDict}};
  
  handle_cast({unregister_service, ProtocolId}, State) ->
      NewDict = handle_unregister_service(ProtocolId, State#state.services),
      {noreply, State#state{services=NewDict}};
  
  handle_cast({register_stats_fun, Fun}, State) ->
  