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:
		
							parent
							
								
									d6181eefed
								
							
						
					
					
						commit
						741a1de374
					
				@ -1011,7 +1011,7 @@ read_meta(US, mnesia) ->
 | 
				
			|||||||
      -> mam_msg() | filtered | not_found.
 | 
					      -> mam_msg() | filtered | not_found.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
read_message(Key, Filter, mnesia) ->
 | 
					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
 | 
					    case mnesia:activity(sync_dirty, ReadMsg, [], mnesia_frag) of
 | 
				
			||||||
      [#mam_msg{} = Msg] ->
 | 
					      [#mam_msg{} = Msg] ->
 | 
				
			||||||
	  case filter_message(Msg, Filter) of
 | 
						  case filter_message(Msg, Filter) of
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user