Просмотр исходного кода

Rename 'already_existed' to 'already_exists'

Feng Lee 7 лет назад
Родитель
Сommit
96122cf966
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      src/emqx_access_control.erl
  2. 1 1
      src/emqx_tracer.erl

+ 1 - 1
src/emqx_access_control.erl

@@ -154,7 +154,7 @@ init([]) ->
 handle_call({register_mod, Type, Mod, Opts, Seq}, _From, State) ->
     Mods = lookup_mods(Type),
     reply(case lists:keymember(Mod, 1, Mods) of
-              true  -> {error, already_existed};
+              true  -> {error, already_exists};
               false ->
                   case catch Mod:init(Opts) of
                       {ok, ModState} ->

+ 1 - 1
src/emqx_tracer.erl

@@ -78,7 +78,7 @@ init([]) ->
 handle_call({start_trace, Who, LogFile}, _From, State = #state{level = Level, traces = Traces}) ->
     case catch lager:trace_file(LogFile, [Who], Level, ?OPTIONS) of
         {ok, exists} ->
-            {reply, {error, already_existed}, State};
+            {reply, {error, already_exists}, State};
         {ok, Trace} ->
             {reply, ok, State#state{traces = maps:put(Who, {Trace, LogFile}, Traces)}};
         {error, Reason} ->