fix authmod

This commit is contained in:
Feng Lee 2015-04-07 13:39:41 +08:00
parent c864944051
commit 920547b9c5
1 changed files with 6 additions and 2 deletions

View File

@ -99,8 +99,12 @@ stop() ->
init([AuthMods]) ->
ets:new(?AUTH_TABLE, [set, named_table, protected]),
Modules = [begin {ok, State} = Mod:init(Opts),
{authmod(Mod), State} end || {Mod, Opts} <- AuthMods],
Modules = lists:map(
fun({Mod, Opts}) ->
AuthMod = authmod(Mod),
{ok, State} = AuthMod:init(Opts),
{AuthMod, State}
end, AuthMods),
ets:insert(?AUTH_TABLE, {auth_modules, Modules}),
{ok, state}.