]> granicus.if.org Git - ejabberd/commitdiff
Allow dynamic node options on sql backends
authorChristophe Romain <christophe.romain@process-one.net>
Wed, 25 Oct 2017 13:40:42 +0000 (15:40 +0200)
committerChristophe Romain <christophe.romain@process-one.net>
Wed, 25 Oct 2017 13:40:42 +0000 (15:40 +0200)
src/nodetree_tree_sql.erl

index 3af035f6cbbefd144071fc80c1f92d76a7834170..0b05a885ef965da56b9bd2529d87e77dc4c01637 100644 (file)
@@ -287,7 +287,7 @@ raw_to_node(Host, {Node, Parent, Type, Nidx}) ->
            Module = misc:binary_to_atom(<<"node_", Type/binary, "_sql">>),
            StdOpts = Module:options(),
            lists:foldl(fun ({Key, Value}, Acc) ->
-                       lists:keyreplace(Key, 1, Acc, {Key, Value})
+                       lists:keystore(Key, 1, Acc, {Key, Value})
                end,
                StdOpts, DbOpts);
        _ ->