25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

The Mnesia table wasn't updated when converting from an old schema.

PR:		EJABP-1

SVN Revision: 1607
This commit is contained in:
Jean-Sébastien Pédron 2008-10-06 15:14:01 +00:00
parent 3f8a303286
commit 0434c1424a
2 changed files with 7 additions and 2 deletions

View File

@ -13,6 +13,9 @@
* src/mod_privacy.erl, src/mod_privacy_odbc.erl: Convert to exmpp.
Thanks to Pablo Polvorin!
* src/mod_privacy.erl: The Mnesia table wasn't updated when converting
from an old schema.
2008-10-02 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/mod_roster_odbc.erl: Fix a bug where a JID represented as a

View File

@ -689,10 +689,12 @@ update_table() ->
F1 = fun() ->
mnesia:write_lock_table(mod_privacy_tmp_table),
mnesia:foldl(
fun(#privacy{us = U} = R, _) ->
fun(#privacy{us = U, lists = L} = R, _) ->
U1 = convert_jid_to_exmpp(U),
L1 = convert_lists_to_exmpp(L),
mnesia:dirty_write(
mod_privacy_tmp_table,
R#privacy{us = {U, Host}})
R#privacy{us = {U1, Host}, lists = L1})
end, ok, privacy)
end,
mnesia:transaction(F1),