summaryrefslogtreecommitdiff
path: root/src/mod_pubsub/mod_pubsub.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_pubsub/mod_pubsub.erl')
-rw-r--r--src/mod_pubsub/mod_pubsub.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl
index 4129fd62..e0acdd2a 100644
--- a/src/mod_pubsub/mod_pubsub.erl
+++ b/src/mod_pubsub/mod_pubsub.erl
@@ -165,12 +165,12 @@ init([ServerHost, Opts]) ->
PepOffline = gen_mod:get_opt(pep_sendlast_offline, Opts, false),
IQDisc = gen_mod:get_opt(iqdisc, Opts, one_queue),
pubsub_index:init(Host, ServerHost, Opts),
+ ets:new(gen_mod:get_module_proc(Host, pubsub_state), [set, named_table]),
+ ets:new(gen_mod:get_module_proc(ServerHost, pubsub_state), [set, named_table]),
{Plugins, NodeTree, PepMapping} = init_plugins(Host, ServerHost, Opts),
mod_disco:register_feature(ServerHost, ?NS_PUBSUB),
- ets:new(gen_mod:get_module_proc(Host, pubsub_state), [set, named_table]),
ets:insert(gen_mod:get_module_proc(Host, pubsub_state), {nodetree, NodeTree}),
ets:insert(gen_mod:get_module_proc(Host, pubsub_state), {plugins, Plugins}),
- ets:new(gen_mod:get_module_proc(ServerHost, pubsub_state), [set, named_table]),
ets:insert(gen_mod:get_module_proc(ServerHost, pubsub_state), {nodetree, NodeTree}),
ets:insert(gen_mod:get_module_proc(ServerHost, pubsub_state), {plugins, Plugins}),
ets:insert(gen_mod:get_module_proc(ServerHost, pubsub_state), {pep_mapping, PepMapping}),
@@ -3003,6 +3003,7 @@ tree_call(Host, Function, Args) ->
end,
catch apply(Module, Function, Args).
tree_action(Host, Function, Args) ->
+ ?DEBUG("tree_action ~p ~p ~p",[Host,Function,Args]),
Fun = fun() -> tree_call(Host, Function, Args) end,
catch mnesia:sync_dirty(Fun).
@@ -3022,7 +3023,8 @@ node_call(Type, Function, Args) ->
Result -> {result, Result} %% any other return value is forced as result
end.
-node_action(_Host, Type, Function, Args) ->
+node_action(Host, Type, Function, Args) ->
+ ?DEBUG("node_action ~p ~p ~p ~p",[Host,Type,Function,Args]),
transaction(fun() ->
node_call(Type, Function, Args)
end, sync_dirty).