From 35a73424165b9519568b5a0176bc9c94bbe87b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Mon, 22 Sep 2008 11:17:23 +0000 Subject: [PATCH] o Remove unappropriate comments in get_sm_features/5. o Use the '_s' variants of NS_* macros instead of a call to atom_to_list/1 in do_route/4. o A call to the stringprep module was left in filter_fields/3. SVN Revision: 1567 --- ChangeLog | 8 ++++++++ src/mod_vcard.erl | 8 +++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 335d81aa7..565bf503e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-22 Jean-Sébastien Pédron + + * src/mod_vcard.erl (get_sm_features): Remove unappropriate + comments. + (do_route): Use the '_s' variants of NS_* macros instead of a call to + atom_to_list/1. + (filter_fields): A call to the stringprep module was left. + 2008-09-18 Jean-Sébastien Pédron * src/mod_roster_odbc.erl: Convert to exmpp. diff --git a/src/mod_vcard.erl b/src/mod_vcard.erl index c81b016f0..0a0b9bf21 100644 --- a/src/mod_vcard.erl +++ b/src/mod_vcard.erl @@ -141,10 +141,8 @@ get_sm_features(Acc, _From, _To, Node, _Lang) -> [] -> case Acc of {result, Features} -> - % XXX OLD FORMAT: NS as string. {result, [?NS_VCARD_s | Features]}; empty -> - % XXX OLD FORMAT: NS as string. {result, [?NS_VCARD_s]} end; _ -> @@ -372,11 +370,11 @@ do_route(ServerHost, From, To, Packet) -> #xmlel{ns = ?NS_DISCO_INFO, name = 'feature', attrs = [ #xmlattr{name = 'var', - value = atom_to_list(?NS_SEARCH)}]}, + value = ?NS_SEARCH_s}]}, #xmlel{ns = ?NS_DISCO_INFO, name = 'feature', attrs = [ #xmlattr{name = 'var', - value = atom_to_list(?NS_VCARD)}]} + value = ?NS_VCARD_s}]} ]}, ResIQ = exmpp_iq:result(Packet, Result), ejabberd_router:route(To, @@ -516,7 +514,7 @@ filter_fields([], Match, _LServer) -> Match; filter_fields([{SVar, [Val]} | Ds], Match, LServer) when is_list(Val) and (Val /= "") -> - LVal = stringprep:tolower(Val), + LVal = exmpp_stringprep:to_lower(Val), NewMatch = case SVar of "user" -> case gen_mod:get_module_opt(LServer, ?MODULE,