From 741a1de374b99deb25068f61ad2fc44f05d61de4 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 17 Feb 2015 00:00:58 +0100 Subject: [PATCH] mod_mam: Fix message lookup In an mnesia:activity/4, mnesia:read/2 must be used instead of mnesia:dirty_read/2. --- mod_mam/src/mod_mam.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod_mam/src/mod_mam.erl b/mod_mam/src/mod_mam.erl index b390731..b946a59 100644 --- a/mod_mam/src/mod_mam.erl +++ b/mod_mam/src/mod_mam.erl @@ -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