]> granicus.if.org Git - ejabberd/commitdiff
Fix migration of pubsub nodes. Was deleting and re-creating all nodes on each startup.
authorNathan Bruning <nathan.bruning@iperity.com>
Sun, 3 Aug 2014 19:03:16 +0000 (21:03 +0200)
committerNathan Bruning <nathan.bruning@iperity.com>
Sun, 3 Aug 2014 19:03:16 +0000 (21:03 +0200)
src/mod_pubsub.erl

index 3dbbabe9fc24f90ee157f93992becaaed26b44f7..91b5afead75338709465832d471843205a6ee4fb 100644 (file)
@@ -690,9 +690,9 @@ update_node_database(Host, ServerHost) ->
     end,
     mnesia:transaction(fun () ->
                               case catch mnesia:first(pubsub_node) of
-                                {_, L} when is_binary(L) ->
+                                {_, L} when is_list(L) ->
                                     lists:foreach(fun ({H, N})
-                                                          when is_binary(N) ->
+                                                          when is_list(N) ->
                                                           [Node] =
                                                               mnesia:read({pubsub_node,
                                                                            {H,