From: Christophe Romain Date: Thu, 18 Dec 2008 13:45:46 +0000 (+0000) Subject: Check option of the nodetree instead of checking configuration X-Git-Tag: v2.1.0~18^2~513 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0fb556a011fe57d931f8616e5fd128aa435661b;p=ejabberd Check option of the nodetree instead of checking configuration SVN Revision: 1737 --- diff --git a/ChangeLog b/ChangeLog index 00d5dfa0e..b8172320f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-18 Christophe Romain + + * src/mod_pubsub/mod_pubsub.erl: Check option of the nodetree instead + of checking configuration (thanks to Eric Cestari)(EJAB-737) + 2008-12-16 Badlop * src/mod_pubsub/mod_pubsub.erl: Fix update pubsub tables from diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index 61002daec..748355bdf 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -1254,8 +1254,8 @@ create_node(Host, ServerHost, Node, Owner, GivenType, Access, Configuration) -> ok -> node_call(Type, create_node, [Host, Node, Owner]); {error, ?ERR_CONFLICT} -> - case ets:lookup(gen_mod:get_module_proc(ServerHost, pubsub_state), nodetree) of - [{nodetree, nodetree_virtual}] -> node_call(Type, create_node, [Host, Node, Owner]); + case proplists:get_value(virtual_tree, tree_call(Host, options, [])) of + true -> node_call(Type, create_node, [Host, Node, Owner]); _ -> {error, ?ERR_CONFLICT} end; Error ->