25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Remove jlib dependency from acl.erl

This commit is contained in:
Evgeniy Khramtsov 2016-07-26 10:01:59 +03:00
parent da310a5173
commit c26d38a893

View File

@ -39,7 +39,7 @@
-include("ejabberd.hrl"). -include("ejabberd.hrl").
-include("logger.hrl"). -include("logger.hrl").
-include("jlib.hrl"). -include("jid.hrl").
-record(acl, {aclname, aclspec}). -record(acl, {aclname, aclspec}).
-record(access, {name :: aclname(), -record(access, {name :: aclname(),
@ -531,7 +531,7 @@ parse_ip_netmask(S) ->
_ -> error _ -> error
end; end;
[IPStr, MaskStr] -> [IPStr, MaskStr] ->
case catch jlib:binary_to_integer(MaskStr) of case catch binary_to_integer(MaskStr) of
Mask when is_integer(Mask), Mask >= 0 -> Mask when is_integer(Mask), Mask >= 0 ->
case inet_parse:address(binary_to_list(IPStr)) of case inet_parse:address(binary_to_list(IPStr)) of
{ok, {_, _, _, _} = IP} when Mask =< 32 -> {ok, {_, _, _, _} = IP} when Mask =< 32 ->