mod_mam: Fix message lookup

In an mnesia:activity/4, mnesia:read/2 must be used instead of
mnesia:dirty_read/2.
This commit is contained in:
Holger Weiss 2015-02-17 00:00:58 +01:00
parent d6181eefed
commit 741a1de374
1 changed files with 1 additions and 1 deletions

View File

@ -1011,7 +1011,7 @@ read_meta(US, mnesia) ->
-> mam_msg() | filtered | not_found.
read_message(Key, Filter, mnesia) ->
ReadMsg = fun() -> mnesia:dirty_read(mam_msg, Key) end,
ReadMsg = fun() -> mnesia:read(mam_msg, Key) end,
case mnesia:activity(sync_dirty, ReadMsg, [], mnesia_frag) of
[#mam_msg{} = Msg] ->
case filter_message(Msg, Filter) of