From: Nathan Bruning Date: Sun, 3 Aug 2014 19:03:16 +0000 (+0200) Subject: Fix migration of pubsub nodes. Was deleting and re-creating all nodes on each startup. X-Git-Tag: 14.12~78^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f63cb21c26e956b0f65e112357c15cadd1a3ed4;p=ejabberd Fix migration of pubsub nodes. Was deleting and re-creating all nodes on each startup. --- diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index 3dbbabe9f..91b5afead 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -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,