diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-01-10 15:54:19 +0000 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-01-10 15:54:19 +0000 |
commit | d536d0ed69899d95d31ddff6bdc25a3ded7fe005 (patch) | |
tree | d6a326a1d0bfc2a6c610cd5c4608410f09551ec4 | |
parent | ca39327fb2b65218785d66a4aa66192783277d60 (diff) | |
download | rabbitmq-server-bug23665.tar.gz |
more consistent namingbug23665
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index a1342289..f4ea6ba8 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -436,7 +436,7 @@ confirm_message_by_guid(Guid, State = #q{guid_to_channel = GTC}) -> State#q{guid_to_channel = dict:erase(Guid, GTC)}. record_confirm_message(#delivery{msg_seq_no = undefined}, State) -> - {'no_confirm', State}; + {no_confirm, State}; record_confirm_message(#delivery{sender = ChPid, msg_seq_no = MsgSeqNo, message = #basic_message { @@ -445,9 +445,9 @@ record_confirm_message(#delivery{sender = ChPid, State = #q{guid_to_channel = GTC, q = #amqqueue{durable = true}}) -> - {'confirm', State#q{guid_to_channel = dict:store(Guid, {ChPid, MsgSeqNo}, GTC)}}; + {confirm, State#q{guid_to_channel = dict:store(Guid, {ChPid, MsgSeqNo}, GTC)}}; record_confirm_message(_Delivery, State) -> - {'no_confirm', State}. + {no_confirm, State}. run_message_queue(State) -> Funs = {fun deliver_from_queue_pred/2, @@ -465,8 +465,8 @@ attempt_delivery(#delivery{txn = none, {NeedsConfirming, State = #q{backing_queue = BQ}}) -> case {NeedsConfirming, MsgSeqNo} of {_, undefined} -> ok; - {'no_confirm', _} -> rabbit_channel:confirm(ChPid, MsgSeqNo); - {'confirm', _} -> ok + {no_confirm, _} -> rabbit_channel:confirm(ChPid, MsgSeqNo); + {confirm, _} -> ok end, PredFun = fun (IsEmpty, _State) -> not IsEmpty end, DeliverFun = @@ -478,7 +478,7 @@ attempt_delivery(#delivery{txn = none, BQ:publish_delivered( AckRequired, Message, (?BASE_MESSAGE_PROPERTIES)#message_properties{ - needs_confirming = (NeedsConfirming =:= 'confirm')}, + needs_confirming = (NeedsConfirming =:= confirm)}, BQS), {{Message, false, AckTag}, true, State1#q{backing_queue_state = BQS1}} @@ -502,12 +502,13 @@ deliver_or_enqueue(Delivery, State) -> case attempt_delivery(Delivery, record_confirm_message(Delivery, State)) of {true, _, State1} -> {true, State1}; - {false, NC, State1 = #q{backing_queue = BQ, - backing_queue_state = BQS}} -> + {false, NeedsConfirming, State1 = #q{backing_queue = BQ, + backing_queue_state = BQS}} -> #delivery{message = Message} = Delivery, BQS1 = BQ:publish(Message, (message_properties(State)) #message_properties{ - needs_confirming = (NC =:= 'confirm')}, + needs_confirming = + (NeedsConfirming =:= confirm)}, BQS), {false, ensure_ttl_timer(State1#q{backing_queue_state = BQS1})} end. |