mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
apply last patch to pubsub_odbc as well
SVN Revision: 2563
This commit is contained in:
parent
e29c992cbf
commit
fdc6149c08
@ -3257,7 +3257,7 @@ set_xoption([_ | Opts], NewOpts) ->
|
|||||||
is_last_item_cache_enabled({_, ServerHost, _}) ->
|
is_last_item_cache_enabled({_, ServerHost, _}) ->
|
||||||
is_last_item_cache_enabled(ServerHost);
|
is_last_item_cache_enabled(ServerHost);
|
||||||
is_last_item_cache_enabled(Host) ->
|
is_last_item_cache_enabled(Host) ->
|
||||||
case ets:lookup(gen_mod:get_module_proc(Host, config), last_item_cache) of
|
case catch ets:lookup(gen_mod:get_module_proc(Host, config), last_item_cache) of
|
||||||
[{last_item_cache, true}] -> true;
|
[{last_item_cache, true}] -> true;
|
||||||
_ -> false
|
_ -> false
|
||||||
end.
|
end.
|
||||||
@ -3281,7 +3281,7 @@ get_cached_item({_, ServerHost, _}, NodeId) ->
|
|||||||
get_cached_item(Host, NodeId) ->
|
get_cached_item(Host, NodeId) ->
|
||||||
case is_last_item_cache_enabled(Host) of
|
case is_last_item_cache_enabled(Host) of
|
||||||
true ->
|
true ->
|
||||||
case ets:lookup(gen_mod:get_module_proc(Host, last_items), NodeId) of
|
case catch ets:lookup(gen_mod:get_module_proc(Host, last_items), NodeId) of
|
||||||
[{NodeId, {ItemId, Payload}}] ->
|
[{NodeId, {ItemId, Payload}}] ->
|
||||||
#pubsub_item{itemid = {ItemId, NodeId}, payload = Payload};
|
#pubsub_item{itemid = {ItemId, NodeId}, payload = Payload};
|
||||||
_ ->
|
_ ->
|
||||||
@ -3294,7 +3294,7 @@ get_cached_item(Host, NodeId) ->
|
|||||||
%%%% plugin handling
|
%%%% plugin handling
|
||||||
|
|
||||||
plugins(Host) ->
|
plugins(Host) ->
|
||||||
case ets:lookup(gen_mod:get_module_proc(Host, config), plugins) of
|
case catch ets:lookup(gen_mod:get_module_proc(Host, config), plugins) of
|
||||||
[{plugins, []}] -> [?STDNODE];
|
[{plugins, []}] -> [?STDNODE];
|
||||||
[{plugins, PL}] -> PL;
|
[{plugins, PL}] -> PL;
|
||||||
_ -> [?STDNODE]
|
_ -> [?STDNODE]
|
||||||
@ -3302,7 +3302,7 @@ plugins(Host) ->
|
|||||||
select_type(ServerHost, Host, Node, Type)->
|
select_type(ServerHost, Host, Node, Type)->
|
||||||
SelectedType = case Host of
|
SelectedType = case Host of
|
||||||
{_User, _Server, _Resource} ->
|
{_User, _Server, _Resource} ->
|
||||||
case ets:lookup(gen_mod:get_module_proc(ServerHost, config), pep_mapping) of
|
case catch ets:lookup(gen_mod:get_module_proc(ServerHost, config), pep_mapping) of
|
||||||
[{pep_mapping, PM}] -> proplists:get_value(Node, PM, ?PEPNODE);
|
[{pep_mapping, PM}] -> proplists:get_value(Node, PM, ?PEPNODE);
|
||||||
_ -> ?PEPNODE
|
_ -> ?PEPNODE
|
||||||
end;
|
end;
|
||||||
@ -3385,7 +3385,7 @@ tree_call({_User, Server, _Resource}, Function, Args) ->
|
|||||||
tree_call(Server, Function, Args);
|
tree_call(Server, Function, Args);
|
||||||
tree_call(Host, Function, Args) ->
|
tree_call(Host, Function, Args) ->
|
||||||
?DEBUG("tree_call ~p ~p ~p",[Host, Function, Args]),
|
?DEBUG("tree_call ~p ~p ~p",[Host, Function, Args]),
|
||||||
Module = case ets:lookup(gen_mod:get_module_proc(Host, config), nodetree) of
|
Module = case catch ets:lookup(gen_mod:get_module_proc(Host, config), nodetree) of
|
||||||
[{nodetree, N}] -> N;
|
[{nodetree, N}] -> N;
|
||||||
_ -> list_to_atom(?TREE_PREFIX ++ ?STDTREE)
|
_ -> list_to_atom(?TREE_PREFIX ++ ?STDTREE)
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user