diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2008-01-10 17:38:24 +0000 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2008-01-10 17:38:24 +0000 |
commit | 09fa4a0ca73f6b0f73ffaa11d3b0f6e49a1a3a39 (patch) | |
tree | 8392a15e74b6cc4f68d7ba03c14abe91a2bc7f29 /src | |
parent | Send last published PEP event now checks the correct peer caps (EJAB-491) (diff) |
Force PEP parent node to be []
SVN Revision: 1144
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_pubsub/nodetree_default.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mod_pubsub/nodetree_default.erl b/src/mod_pubsub/nodetree_default.erl index a7360bc21..3c8a63e6b 100644 --- a/src/mod_pubsub/nodetree_default.erl +++ b/src/mod_pubsub/nodetree_default.erl @@ -144,11 +144,15 @@ create_node(Key, Node, Type, Owner, Options) -> {[], true}; _ -> Parent = lists:sublist(Node, length(Node) - 1), - (Parent == []) orelse + case Parent of + [] -> + {[], true}; + _ -> case mnesia:read({pubsub_node, {Key, Parent}}) of [] -> {Parent, false}; _ -> {Parent, true} end + end end, case ParentExists of true -> |