summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-02-11 13:04:21 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2011-02-11 13:04:21 +0000
commit6d1e427077d3f46ad0813dc77393d71286163dd1 (patch)
tree75c3911fbec6ccc43c42830cca8506b6669944d0 /src
parentcbaf7acb4d20f0e9f3823762dad00410edff857a (diff)
downloadrabbitmq-server-git-6d1e427077d3f46ad0813dc77393d71286163dd1.tar.gz
Remove hardcoded protocol now channels have the real protocol
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_channel.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index b830a2cbbd..aeb8475885 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -1115,9 +1115,8 @@ binding_action(Fun, ExchangeNameBin, DestinationType, DestinationNameBin,
basic_return(#basic_message{exchange_name = ExchangeName,
routing_key = RoutingKey,
content = Content},
- WriterPid, Reason) ->
- {_Close, ReplyCode, ReplyText} =
- rabbit_framing_amqp_0_9_1:lookup_amqp_exception(Reason),
+ #ch{protocol = Protocol, writer_pid = WriterPid}, Reason) ->
+ {_Close, ReplyCode, ReplyText} = Protocol:lookup_amqp_exception(Reason),
ok = rabbit_writer:send_command(
WriterPid,
#'basic.return'{reply_code = ReplyCode,
@@ -1274,10 +1273,10 @@ is_message_persistent(Content) ->
end.
process_routing_result(unroutable, _, XName, MsgSeqNo, Msg, State) ->
- ok = basic_return(Msg, State#ch.writer_pid, no_route),
+ ok = basic_return(Msg, State, no_route),
record_confirm(MsgSeqNo, XName, State);
process_routing_result(not_delivered, _, XName, MsgSeqNo, Msg, State) ->
- ok = basic_return(Msg, State#ch.writer_pid, no_consumers),
+ ok = basic_return(Msg, State, no_consumers),
record_confirm(MsgSeqNo, XName, State);
process_routing_result(routed, [], XName, MsgSeqNo, _, State) ->
record_confirm(MsgSeqNo, XName, State);