25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Don't delete the whole table, as other module instances may already have started rooms.

This commit is contained in:
Badlop 2010-12-30 03:05:24 +01:00
parent a4728d14d5
commit ff455f1a42

View File

@ -298,7 +298,6 @@ migrate(After) ->
%% Description: Initiates the server
%%--------------------------------------------------------------------
init([Host, Opts]) ->
update_muc_online_table(),
MyHost_L = gen_mod:expand_host_name(Host, Opts, "conference"),
MyHost = list_to_binary(MyHost_L),
Backend = gen_mod:get_opt(backend, Opts, mnesia),
@ -1014,11 +1013,3 @@ get_vh_rooms_all_nodes(Host) ->
get_vh_rooms(Host) when is_binary(Host) ->
gen_storage:dirty_select(Host, muc_online_room,
[{'=', name_host, {'_', Host}}]).
update_muc_online_table() ->
case catch mnesia:table_info(muc_online_room, local_content) of
false ->
mnesia:delete_table(muc_online_room);
_ ->
ok
end.