From b4f0bb65c6aac7e4d0fd60cb870a10e194024eda Mon Sep 17 00:00:00 2001 From: Pablo Polvorin Date: Tue, 25 Aug 2009 17:23:43 +0000 Subject: [PATCH] Fix disco#items on pubsub nodes SVN Revision: 2534 --- src/mod_pubsub/mod_pubsub.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index dfe8ab5a2..9d097fa55 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -1029,7 +1029,7 @@ node_disco_info(Host, Node, From, Identity, Features) -> []; true -> Types = - case tree_call(Host, get_subnodes, [NodeId, From]) of + case tree_call(Host, get_subnodes, [Host, Node, From]) of [] -> ["leaf"]; %% No sub-nodes: it's a leaf node _ -> @@ -1117,7 +1117,7 @@ iq_disco_items(Host, Item, From) -> RN = lists:last(SubNode), #xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs = [?XMLATTR('jid', Host), ?XMLATTR('node', SN), ?XMLATTR('name', RN)]} - end, tree_call(Host, get_subnodes, [NodeId, From])), + end, tree_call(Host, get_subnodes, [Host, Node, From])), Items = lists:map( fun(#pubsub_item{itemid = {RN, _}}) -> SN = node_to_string(Node) ++ "!" ++ RN,