mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Fix MUC start when Mnesia tables don't exist yet
This commit is contained in:
parent
a99c1e7031
commit
bc077266d9
@ -240,7 +240,6 @@ init([Host, Opts]) ->
|
|||||||
MyHost = gen_mod:get_opt_host(Host, Opts, "conference.@HOST@"),
|
MyHost = gen_mod:get_opt_host(Host, Opts, "conference.@HOST@"),
|
||||||
case gen_mod:db_type(Opts) of
|
case gen_mod:db_type(Opts) of
|
||||||
mnesia ->
|
mnesia ->
|
||||||
update_tables(MyHost),
|
|
||||||
mnesia:create_table(muc_room,
|
mnesia:create_table(muc_room,
|
||||||
[{disc_copies, [node()]},
|
[{disc_copies, [node()]},
|
||||||
{attributes,
|
{attributes,
|
||||||
@ -249,6 +248,7 @@ init([Host, Opts]) ->
|
|||||||
[{disc_copies, [node()]},
|
[{disc_copies, [node()]},
|
||||||
{attributes,
|
{attributes,
|
||||||
record_info(fields, muc_registered)}]),
|
record_info(fields, muc_registered)}]),
|
||||||
|
update_tables(MyHost),
|
||||||
mnesia:add_table_index(muc_registered, nick);
|
mnesia:add_table_index(muc_registered, nick);
|
||||||
_ ->
|
_ ->
|
||||||
ok
|
ok
|
||||||
|
Loading…
Reference in New Issue
Block a user