aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2008-01-10 17:38:24 +0000
committerChristophe Romain <christophe.romain@process-one.net>2008-01-10 17:38:24 +0000
commit09fa4a0ca73f6b0f73ffaa11d3b0f6e49a1a3a39 (patch)
tree8392a15e74b6cc4f68d7ba03c14abe91a2bc7f29 /src
parentSend 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.erl6
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 ->