From: Paweł Chmielowski Date: Mon, 27 Feb 2017 19:38:59 +0000 (+0100) Subject: Fix compilation on R17 X-Git-Tag: 17.03~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a186e242d0c98c4aed5b776e43ed00ab199b8d0;p=ejabberd Fix compilation on R17 --- diff --git a/src/ejabberd_auth.erl b/src/ejabberd_auth.erl index 10fbca5f8..6571d864e 100644 --- a/src/ejabberd_auth.erl +++ b/src/ejabberd_auth.erl @@ -100,7 +100,7 @@ init([]) -> fun(Host, Acc) -> Modules = auth_modules(Host), start(Host, Modules), - Acc#{Host => Modules} + maps:put(Host, Modules, Acc) end, #{}, ?MYHOSTS), {ok, #state{host_modules = HostModules}}. @@ -111,7 +111,7 @@ handle_call(_Request, _From, State) -> handle_cast({host_up, Host}, #state{host_modules = HostModules} = State) -> Modules = auth_modules(Host), start(Host, Modules), - NewHostModules = HostModules#{Host => Modules}, + NewHostModules = maps:put(Host, Modules, HostModules), {noreply, State#state{host_modules = NewHostModules}}; handle_cast({host_down, Host}, #state{host_modules = HostModules} = State) -> Modules = maps:get(Host, HostModules, []), @@ -125,7 +125,7 @@ handle_cast(config_reloaded, #state{host_modules = HostModules} = State) -> NewModules = auth_modules(Host), start(Host, NewModules -- OldModules), stop(Host, OldModules -- NewModules), - Acc#{Host => NewModules} + maps:put(Host, NewModules, Acc) end, HostModules, ?MYHOSTS), {noreply, State#state{host_modules = NewHostModules}}; handle_cast(Msg, State) ->