From 330a4c94520e8ae164b04833df5d8ff9bb4bfd69 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 2 Sep 2009 14:25:42 +0000 Subject: [PATCH] Small fix exmpp related code SVN Revision: 2581 --- src/acl.erl | 6 ++++-- src/mod_configure.erl | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/acl.erl b/src/acl.erl index 8ab703514..7287a0ba4 100644 --- a/src/acl.erl +++ b/src/acl.erl @@ -298,9 +298,11 @@ match_acl(ACLName, JID, Host) -> end. %% @spec (String, RegExp) -> bool() -%% String = string() +%% String = string() | undefined %% RegExp = string() +is_regexp_match(undefined, RegExp) -> + false; is_regexp_match(String, RegExp) -> case regexp:first_match(String, RegExp) of nomatch -> @@ -315,7 +317,7 @@ is_regexp_match(String, RegExp) -> end. %% @spec (String, Glob) -> bool() -%% String = string() +%% String = string() | undefined %% Glob = string() is_glob_match(String, Glob) -> diff --git a/src/mod_configure.erl b/src/mod_configure.erl index b947e7424..dd8040eca 100644 --- a/src/mod_configure.erl +++ b/src/mod_configure.erl @@ -325,7 +325,7 @@ adhoc_local_items(Acc, From, To, Lang) -> Lang), Nodes1 = lists:filter( 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), case F of {result, [?NS_ADHOC_s]} ->