]> granicus.if.org Git - ejabberd/commitdiff
* src/mod_muc/mod_muc.erl: Catch creation of table
authorBadlop <badlop@process-one.net>
Thu, 6 Dec 2007 15:40:21 +0000 (15:40 +0000)
committerBadlop <badlop@process-one.net>
Thu, 6 Dec 2007 15:40:21 +0000 (15:40 +0000)
muc_online_users: it may be already created by other mod_muc
instance

SVN Revision: 1036

ChangeLog
src/mod_muc/mod_muc.erl

index f55968581c6416bee1605d35006aeb42b4a85e08..f13014b138bb0335fcba390fdf0658ebd28f6a37 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-12-06  Badlop  <badlop@process-one.net>
 
+       * src/mod_muc/mod_muc.erl: Catch creation of table
+       muc_online_users: it may be already created by other mod_muc
+       instance
+
        * doc/Makefile: Remove bashism
 
        * doc/guide.tex: Document how to change computer
index 09061650a1e2156a99b474f3c91a7dbb2d495865..fe315a61671121f769a1047e795ed610f8939d35 100644 (file)
@@ -149,10 +149,7 @@ init([Host, Opts]) ->
                        [{ram_copies, [node()]},
                         {attributes, record_info(fields, muc_online_room)}]),
     mnesia:add_table_copy(muc_online_room, node(), ram_copies),
-    ets:new(muc_online_users, [bag,
-                              named_table,
-                              public,
-                              {keypos, 2}]),
+    catch ets:new(muc_online_users, [bag, named_table, public, {keypos, 2}]),
     MyHost = gen_mod:get_opt_host(Host, Opts, "conference.@HOST@"),
     update_tables(MyHost),
     clean_table_from_bad_node(node(), MyHost),