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

Small fix exmpp related code

SVN Revision: 2581
This commit is contained in:
Badlop 2009-09-02 14:25:42 +00:00
parent fa23b83dbb
commit 330a4c9452
2 changed files with 5 additions and 3 deletions

View File

@ -298,9 +298,11 @@ match_acl(ACLName, JID, Host) ->
end. end.
%% @spec (String, RegExp) -> bool() %% @spec (String, RegExp) -> bool()
%% String = string() %% String = string() | undefined
%% RegExp = string() %% RegExp = string()
is_regexp_match(undefined, RegExp) ->
false;
is_regexp_match(String, RegExp) -> is_regexp_match(String, RegExp) ->
case regexp:first_match(String, RegExp) of case regexp:first_match(String, RegExp) of
nomatch -> nomatch ->
@ -315,7 +317,7 @@ is_regexp_match(String, RegExp) ->
end. end.
%% @spec (String, Glob) -> bool() %% @spec (String, Glob) -> bool()
%% String = string() %% String = string() | undefined
%% Glob = string() %% Glob = string()
is_glob_match(String, Glob) -> is_glob_match(String, Glob) ->

View File

@ -325,7 +325,7 @@ adhoc_local_items(Acc, From, To, Lang) ->
Lang), Lang),
Nodes1 = lists:filter( Nodes1 = lists:filter(
fun(N) -> fun(N) ->
Nd = exmpp_xml:get_attribute_as_list(N, 'node', ""), Nd = exmpp_xml:get_attribute_as_binary(N, 'node', ""),
F = get_local_features([], From, To, Nd, Lang), F = get_local_features([], From, To, Nd, Lang),
case F of case F of
{result, [?NS_ADHOC_s]} -> {result, [?NS_ADHOC_s]} ->