diff options
| author | Matthias Radestock <matthias@lshift.net> | 2010-05-02 19:46:30 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2010-05-02 19:46:30 +0100 |
| commit | e118da00ff6e6d789fff8adc059465556c49934a (patch) | |
| tree | c81803892978f91d929c5b65ec74cefe5e369629 /src | |
| parent | 122fc41988c068d2925b95804aeab8bf4c167dd9 (diff) | |
| download | rabbitmq-server-git-e118da00ff6e6d789fff8adc059465556c49934a.tar.gz | |
cosmetic
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index eb103ec92d..06712e9c3d 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -269,7 +269,8 @@ deliver_msgs_to_consumers(Funs = {PredFun, DeliverFun}, FunAcc, ChPid, ConsumerTag, AckRequired, {QName, self(), AckTag, IsDelivered, Message}), ChAckTags1 = case AckRequired of - true -> sets:add_element(AckTag, ChAckTags); + true -> sets:add_element( + AckTag, ChAckTags); false -> ChAckTags end, NewC = C#cr{unsent_message_count = Count + 1, @@ -585,8 +586,8 @@ handle_call({basic_get, ChPid, NoAck}, _From, C#cr{acktags = sets:add_element(AckTag, ChAckTags)}); false -> ok end, - reply({ok, Remaining, {QName, self(), AckTag, IsDelivered, Message}}, - State#q{backing_queue_state = BQS1}) + Msg = {QName, self(), AckTag, IsDelivered, Message}, + reply({ok, Remaining, Msg}, State#q{backing_queue_state = BQS1}) end; handle_call({basic_consume, NoAck, ReaderPid, ChPid, LimiterPid, @@ -673,8 +674,7 @@ handle_call(stat, _From, State = #q{q = #amqqueue{name = Name}, handle_call({delete, IfUnused, IfEmpty}, _From, State = #q{backing_queue_state = BQS, backing_queue = BQ}) -> - Length = BQ:len(BQS), - IsEmpty = Length == 0, + IsEmpty = BQ:is_empty(BQS), IsUnused = is_unused(State), if IfEmpty and not(IsEmpty) -> @@ -682,7 +682,7 @@ handle_call({delete, IfUnused, IfEmpty}, _From, IfUnused and not(IsUnused) -> reply({error, in_use}, State); true -> - {stop, normal, {ok, Length}, State} + {stop, normal, {ok, BQ:len(BQS)}, State} end; handle_call(purge, _From, State = #q{backing_queue = BQ, |
