From 2f1397c50ec393739355ccb502bc4a69aabb75fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Wed, 21 Jan 2009 13:30:18 +0000 Subject: [PATCH] Use string() version of UserName and UserHost. PR: EJABP-1 SVN Revision: 1839 --- ChangeLog | 3 +++ src/mod_pubsub/nodetree_virtual.erl | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b71b7a526..76c3adbfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ * src/cyrsasl.erl: Return invalid-mechanism when a mechanism isn't supported instead of no-mechanism, which wasn't standard-compliant. + * src/mod_pubsub/nodetree_virtual.erl (create_node/5): Use string() + version of UserName and UserHost. + 2009-01-19 Pablo Polvorin * src/cyrsasl_digest.erl: Typo (prolists -> proplists). diff --git a/src/mod_pubsub/nodetree_virtual.erl b/src/mod_pubsub/nodetree_virtual.erl index 92864a272..a850f26e6 100644 --- a/src/mod_pubsub/nodetree_virtual.erl +++ b/src/mod_pubsub/nodetree_virtual.erl @@ -130,8 +130,8 @@ get_subnodes_tree(_Host, _Node) -> %% is considered as already created.

%%

default allowed nodes: /home/host/user/any/node/name

create_node(_Host, Node, _Type, Owner, _Options) -> - UserName = Owner#jid.lnode, - UserHost = Owner#jid.ldomain, + UserName = exmpp_jid:lnode_as_list(Owner), + UserHost = exmpp_jid:ldomain_as_list(Owner), case Node of ["home", UserHost, UserName | _] -> {error, 'conflict'}; _ -> {error, 'not-allowed'}