anchor.diff:      end.
   
   prioritise_info(_Msg, _Len, _State) ->
  -    1.
  +    3.
   
   handle_call(Req, _From, State) ->
       lager:error("Unexpected request: ~p", [Req]),
  
positive.code: -record(state, {id, statsfun, monitors}).
  
  -define(CM_POOL, ?MODULE).
  
  -define(LOG(Level, Format, Args, Client),
              lager:Level("CM(~s): " ++ Format, [Client#mqtt_client.client_id|Args])).
  
  %%%=============================================================================
  %%% API
  
negative.code: handle_cast({register, Client = #mqtt_client{client_id  = ClientId,
                                               client_pid = Pid}}, State) ->
      case lookup_proc(ClientId) of
          Pid ->
              {noreply, State};
          _ ->
              ets:insert(mqtt_client, Client),
              {noreply, setstats(monitor_client(ClientId, Pid, State))}
  	end;
  