25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Do not init nodes from mod_pubsub (#609)

Let each plugin do its own initialisation in init_plugins
init_nodes was an old function to be removed.
This commit is contained in:
Christophe Romain 2015-07-22 08:03:27 +02:00
parent b47a27f3ac
commit 9c36a9df78

View File

@ -312,7 +312,6 @@ init([ServerHost, Opts]) ->
pubsub_migrate:update_node_database(Host, ServerHost), pubsub_migrate:update_node_database(Host, ServerHost),
pubsub_migrate:update_state_database(Host, ServerHost), pubsub_migrate:update_state_database(Host, ServerHost),
pubsub_migrate:update_lastitem_database(Host, ServerHost), pubsub_migrate:update_lastitem_database(Host, ServerHost),
init_nodes(Host, ServerHost, NodeTree, Plugins),
{_, State} = init_send_loop(ServerHost), {_, State} = init_send_loop(ServerHost),
{ok, State}. {ok, State}.
@ -386,14 +385,6 @@ terminate_plugins(Host, ServerHost, Plugins, TreePlugin) ->
TreePlugin:terminate(Host, ServerHost), TreePlugin:terminate(Host, ServerHost),
ok. ok.
init_nodes(Host, ServerHost, _NodeTree, Plugins) ->
case lists:member(<<"hometree">>, Plugins) of
true ->
create_node(Host, ServerHost, <<"/home">>, service_jid(Host), <<"hometree">>),
create_node(Host, ServerHost, <<"/home/", ServerHost/binary>>, service_jid(Host), <<"hometree">>);
false -> ok
end.
send_loop(State) -> send_loop(State) ->
receive receive
{presence, JID, Pid} -> {presence, JID, Pid} ->