]> granicus.if.org Git - ejabberd/commitdiff
Fix MUC start when Mnesia tables don't exist yet
authorBadlop <badlop@process-one.net>
Fri, 8 Jun 2012 14:39:15 +0000 (16:39 +0200)
committerBadlop <badlop@process-one.net>
Fri, 8 Jun 2012 14:39:15 +0000 (16:39 +0200)
src/mod_muc/mod_muc.erl

index 811e3c068672933dffa041d5de7c9b00ea8d0dc0..fe022391de129c9a986c1031c14fcf92621443cb 100644 (file)
@@ -240,7 +240,6 @@ init([Host, Opts]) ->
     MyHost = gen_mod:get_opt_host(Host, Opts, "conference.@HOST@"),
     case gen_mod:db_type(Opts) of
         mnesia ->
-            update_tables(MyHost),
             mnesia:create_table(muc_room,
                                 [{disc_copies, [node()]},
                                  {attributes,
@@ -249,6 +248,7 @@ init([Host, Opts]) ->
                                 [{disc_copies, [node()]},
                                  {attributes,
                                   record_info(fields, muc_registered)}]),
+            update_tables(MyHost),
             mnesia:add_table_index(muc_registered, nick);
         _ ->
             ok