26
1
mirror of https://github.com/processone/ejabberd.git synced 2025-01-03 18:02:28 +01:00

Don't use lists:keyfind/3 bcause it was introduced only in recent R13A.

SVN Revision: 2341
This commit is contained in:
Badlop 2009-06-25 18:05:12 +00:00
parent edb5211f5f
commit 523239d5a7

View File

@ -59,8 +59,8 @@ set(_) ->
exit("Loglevel must be an integer"). exit("Loglevel must be an integer").
level_to_integer(Level) -> level_to_integer(Level) ->
case lists:keyfind(Level, 2, ?LOG_LEVELS) of case lists:keysearch(Level, 2, ?LOG_LEVELS) of
{Int, Level, _Desc} -> Int; {value, {Int, Level, _Desc}} -> Int;
_ -> erlang:error({no_such_loglevel, Level}) _ -> erlang:error({no_such_loglevel, Level})
end. end.