pubsub disco_sm_items bugfix

SVN Revision: 1051
This commit is contained in:
Christophe Romain 2007-12-08 15:24:38 +00:00
parent d788bd1a27
commit 23b91e953a
2 changed files with 10 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2007-12-06 Christophe Romain <christophe.romain@process-one.net>
* src/mod_pubsub/mod_pubsub.erl: disco_sm_items bugfix
2007-12-07 Alexey Shchepin <alexey@process-one.net>
* src/ejabberd_sm.erl: Bugfix

View File

@ -347,7 +347,7 @@ disco_sm_items(Acc, _From, To, Node, _Lang) ->
%% TODO, use iq_disco_items(Host, Node, From)
Host = To#jid.lserver,
LJID = jlib:jid_tolower(jlib:jid_remove_resource(To)),
case tree_action(Host, get_items, [Host, Node]) of
case get_items(Host, Node) of
[] ->
Acc;
AllItems ->
@ -2705,11 +2705,10 @@ features(Host, Node) ->
tree_call({_User, Server, _Resource}, Function, Args) ->
tree_call(Server, Function, Args);
tree_call(Host, Function, Args) ->
Module = case ets:lookup(gen_mod:get_module_proc(Host, pubsub_state),
nodetree) of
[{nodetree, N}] -> N;
_ -> list_to_atom(?TREE_PREFIX ++ ?STDNODE)
end,
Module = case ets:lookup(gen_mod:get_module_proc(Host, pubsub_state), nodetree) of
[{nodetree, N}] -> N;
_ -> list_to_atom(?TREE_PREFIX ++ ?STDNODE)
end,
catch apply(Module, Function, Args).
tree_action(Host, Function, Args) ->
Fun = fun() -> tree_call(Host, Function, Args) end,