Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
fixes assert equivalence implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
videlalvaro committed Oct 30, 2011
1 parent 2a34cf0 commit 04ada87
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rabbit_exchange_type_recent_history.erl
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ add_binding(_Tx, #exchange{ name = XName },
remove_bindings(_Tx, _X, _Bs) -> ok.

assert_args_equivalence(X, Args) ->
rabbit_exchange_type_direct:assert_args_equivalence(X, Args).
rabbit_exchange:assert_args_equivalence(X, Args).

%%private
setup_schema() ->
case mnesia:create_table(?RH_TABLE,
[{attributes, record_info(fields, cached)},
Expand All @@ -77,6 +76,7 @@ setup_schema() ->
{aborted, {already_exists, ?RH_TABLE}} -> ok
end.

%%private
cache_msg(XName, Content) ->
rabbit_misc:execute_mnesia_transaction(
fun () ->
Expand All @@ -98,7 +98,7 @@ get_msgs_from_cache(XName) ->
store_msg(Key, Cached, Content) ->
mnesia:write(?RH_TABLE,
#cached{key = Key,
content = [Content|lists:sublist(Cached, ?KEEP_NB)]},
content = [Content|lists:sublist(Cached, ?KEEP_NB-1)]},
write).

msgs_from_content(XName, Cached) ->
Expand All @@ -113,7 +113,7 @@ deliver_messages(Queue, Msgs) ->
fun (Msg) ->
Delivery = rabbit_basic:delivery(false, false, Msg, undefined),
rabbit_amqqueue:deliver(Queue, Delivery)
end, Msgs).
end, lists:reverse(Msgs)).

queue_not_found_error(QName) ->
rabbit_misc:protocol_error(
Expand Down

0 comments on commit 04ada87

Please sign in to comment.