diff options
Diffstat (limited to 'src/mod_pubsub/nodetree_default.erl')
-rw-r--r-- | src/mod_pubsub/nodetree_default.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mod_pubsub/nodetree_default.erl b/src/mod_pubsub/nodetree_default.erl index 6dec6c5e..36b763df 100644 --- a/src/mod_pubsub/nodetree_default.erl +++ b/src/mod_pubsub/nodetree_default.erl @@ -70,8 +70,7 @@ init(_Host, _ServerHost, _Opts) -> mnesia:create_table(pubsub_node, [{disc_copies, [node()]}, - {attributes, record_info(fields, pubsub_node)}, - {index, [type,parentid]}]), + {attributes, record_info(fields, pubsub_node)}]), NodesFields = record_info(fields, pubsub_node), case mnesia:table_info(pubsub_node, attributes) of [host_node, host_parent, info] -> ok; % old schema, updated later by pubsub @@ -115,7 +114,7 @@ get_nodes(Key) -> %% Node = mod_pubsub:pubsubNode() %% From = mod_pubsub:jid() get_subnodes(Host, Node, _From) -> - mnesia:index_read(pubsub_node, {Host, Node}, #pubsub_node.parentid). + mnesia:match_object(#pubsub_node{parentid = {Host, Node}, _ = '_'}). %% @spec (Host, Index) -> [pubsubNode()] | {error, Reason} %% Host = mod_pubsub:host() |