summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-01-22 15:14:38 +0000
committerSimon MacMullen <simon@rabbitmq.com>2014-01-22 15:14:38 +0000
commitc409185407227ffd5830c03e922b61b1891219a6 (patch)
tree169f5814ec641db3b9805702e41a38708d64b1ac
parent9a80d2b11c339c8ee4d623719a66036f355d8cd4 (diff)
downloadrabbitmq-server-c409185407227ffd5830c03e922b61b1891219a6.tar.gz
s/confirmed/confirm/g, fix a test.
-rw-r--r--include/rabbit.hrl2
-rw-r--r--src/rabbit_amqqueue_process.erl6
-rw-r--r--src/rabbit_basic.erl4
-rw-r--r--src/rabbit_channel.erl4
-rw-r--r--src/rabbit_tests.erl2
5 files changed, 9 insertions, 9 deletions
diff --git a/include/rabbit.hrl b/include/rabbit.hrl
index ba52a407..6d117e3d 100644
--- a/include/rabbit.hrl
+++ b/include/rabbit.hrl
@@ -70,7 +70,7 @@
is_persistent}).
-record(ssl_socket, {tcp, ssl}).
--record(delivery, {mandatory, confirmed, sender, message, msg_seq_no}).
+-record(delivery, {mandatory, confirm, sender, message, msg_seq_no}).
-record(amqp_error, {name, explanation = "", method = none}).
-record(event, {type, props, timestamp}).
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 23fbf93f..c65347e4 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -425,9 +425,9 @@ confirm_messages(MsgIds, State = #q{msg_id_to_channel = MTC}) ->
rabbit_misc:gb_trees_foreach(fun rabbit_misc:confirm_to_sender/2, CMs),
State#q{msg_id_to_channel = MTC1}.
-send_or_record_confirm(#delivery{confirmed = false}, State) ->
+send_or_record_confirm(#delivery{confirm = false}, State) ->
{never, State};
-send_or_record_confirm(#delivery{confirmed = true,
+send_or_record_confirm(#delivery{confirm = true,
sender = SenderPid,
msg_seq_no = MsgSeqNo,
message = #basic_message {
@@ -437,7 +437,7 @@ send_or_record_confirm(#delivery{confirmed = true,
msg_id_to_channel = MTC}) ->
MTC1 = gb_trees:insert(MsgId, {SenderPid, MsgSeqNo}, MTC),
{eventually, State#q{msg_id_to_channel = MTC1}};
-send_or_record_confirm(#delivery{confirmed = true,
+send_or_record_confirm(#delivery{confirm = true,
sender = SenderPid,
msg_seq_no = MsgSeqNo}, State) ->
rabbit_misc:confirm_to_sender(SenderPid, [MsgSeqNo]),
diff --git a/src/rabbit_basic.erl b/src/rabbit_basic.erl
index 927489da..a5dc6eb2 100644
--- a/src/rabbit_basic.erl
+++ b/src/rabbit_basic.erl
@@ -109,8 +109,8 @@ publish(X, Delivery) ->
DeliveredQPids = rabbit_amqqueue:deliver(Qs, Delivery),
{ok, DeliveredQPids}.
-delivery(Mandatory, Confirmed, Message, MsgSeqNo) ->
- #delivery{mandatory = Mandatory, confirmed = Confirmed, sender = self(),
+delivery(Mandatory, Confirm, Message, MsgSeqNo) ->
+ #delivery{mandatory = Mandatory, confirm = Confirm, sender = self(),
message = Message, msg_seq_no = MsgSeqNo}.
build_content(Properties, BodyBin) when is_binary(BodyBin) ->
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index b5333788..9bcded68 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -1521,7 +1521,7 @@ deliver_to_queues({#delivery{message = #basic_message{exchange_name = XName},
deliver_to_queues({Delivery = #delivery{message = Message = #basic_message{
exchange_name = XName},
mandatory = Mandatory,
- confirmed = Confirmed,
+ confirm = Confirm,
msg_seq_no = MsgSeqNo},
DelQNames}, State = #ch{queue_names = QNames,
queue_monitors = QMons}) ->
@@ -1546,7 +1546,7 @@ deliver_to_queues({Delivery = #delivery{message = Message = #basic_message{
end, pmon:monitor(QPid, QMons0)}
end, {QNames, pmon:monitor_all(DeliveredQPids, QMons)}, Qs),
State1 = process_routing_confirm(
- DeliveredQPids, Confirmed, MsgSeqNo, XName,
+ DeliveredQPids, Confirm, MsgSeqNo, XName,
process_routing_mandatory(
DeliveredQPids, Mandatory, MsgSeqNo, Message,
State#ch{queue_names = QNames1,
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index dfb5794c..cffc4cf1 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -2408,7 +2408,7 @@ publish_and_confirm(Q, Payload, Count) ->
<<>>, #'P_basic'{delivery_mode = 2},
Payload),
Delivery = #delivery{mandatory = false, sender = self(),
- message = Msg, msg_seq_no = Seq},
+ confirm = true, message = Msg, msg_seq_no = Seq},
_QPids = rabbit_amqqueue:deliver([Q], Delivery)
end || Seq <- Seqs],
wait_for_confirms(gb_sets:from_list(Seqs)).