summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-06-18 13:19:43 +0100
committerSimon MacMullen <simon@rabbitmq.com>2010-06-18 13:19:43 +0100
commite8d57bd39c4ae5c0bce4d8303dfbb1a8f3324493 (patch)
tree332989240aa117b3f760ec4076e1d2860fbb49be
parent98ababda28aaaf48593f5e5bf333560e73cb74d3 (diff)
downloadrabbitmq-server-e8d57bd39c4ae5c0bce4d8303dfbb1a8f3324493.tar.gz
Permit basic.recover on a transactional channel.
-rw-r--r--src/rabbit_channel.erl10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index b087aac6..6caacc82 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -609,8 +609,7 @@ handle_method(#'basic.qos'{prefetch_count = PrefetchCount},
{reply, #'basic.qos_ok'{}, State#ch{limiter_pid = LimiterPid2}};
handle_method(#'basic.recover_async'{requeue = true},
- _, State = #ch{ transaction_id = none,
- unacked_message_q = UAMQ }) ->
+ _, State = #ch{ unacked_message_q = UAMQ }) ->
ok = fold_per_queue(
fun (QPid, MsgIds, ok) ->
%% The Qpid python test suite incorrectly assumes
@@ -625,8 +624,7 @@ handle_method(#'basic.recover_async'{requeue = true},
{noreply, State#ch{unacked_message_q = queue:new()}};
handle_method(#'basic.recover_async'{requeue = false},
- _, State = #ch{ transaction_id = none,
- writer_pid = WriterPid,
+ _, State = #ch{ writer_pid = WriterPid,
unacked_message_q = UAMQ }) ->
ok = rabbit_misc:queue_fold(
fun ({_DeliveryTag, none, _Msg}, ok) ->
@@ -650,9 +648,6 @@ handle_method(#'basic.recover_async'{requeue = false},
%% variant of this method
{noreply, State};
-handle_method(#'basic.recover_async'{}, _, _State) ->
- rabbit_misc:protocol_error(
- not_allowed, "attempt to recover a transactional channel",[]);
handle_method(#'basic.recover'{requeue = Requeue}, Content, State) ->
{noreply, State2 = #ch{writer_pid = WriterPid}} =
@@ -661,7 +656,6 @@ handle_method(#'basic.recover'{requeue = Requeue}, Content, State) ->
State),
ok = rabbit_writer:send_command(WriterPid, #'basic.recover_ok'{}),
{noreply, State2};
-
handle_method(#'exchange.declare'{exchange = ExchangeNameBin,
type = TypeNameBin,
passive = false,