summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2011-06-27 18:21:06 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2011-06-27 18:21:06 +0100
commit4c685a35e7020e8e66584759a18e2da6e4c39969 (patch)
treea7d0fb0a50f677742256fba3b58d7c82ce48b317 /src
parent4b50006fe43430efc36cf84b4a553ff94937ef42 (diff)
downloadrabbitmq-server-4c685a35e7020e8e66584759a18e2da6e4c39969.tar.gz
tiny refactor: better function namesbug24179
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_channel.erl17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 51d844c9..b8501c68 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -290,7 +290,7 @@ handle_cast({deliver, ConsumerTag, AckRequired,
true -> deliver;
false -> deliver_no_ack
end, State),
- maybe_incr_redeliver(Redelivered, QPid, State),
+ maybe_incr_redeliver_stats(Redelivered, QPid, State),
rabbit_trace:tap_trace_out(Msg, TraceState),
noreply(State1#ch{next_tag = DeliveryTag + 1});
@@ -684,12 +684,11 @@ handle_method(#'basic.get'{queue = QueueNameBin,
State1 = lock_message(not(NoAck),
ack_record(DeliveryTag, none, Msg),
State),
- maybe_incr_stats([{QPid, 1}],
- case NoAck of
- true -> get_no_ack;
- false -> get
- end, State),
- maybe_incr_redeliver(Redelivered, QPid, State),
+ maybe_incr_stats([{QPid, 1}], case NoAck of
+ true -> get_no_ack;
+ false -> get
+ end, State),
+ maybe_incr_redeliver_stats(Redelivered, QPid, State),
rabbit_trace:tap_trace_out(Msg, TraceState),
ok = rabbit_writer:send_command(
WriterPid,
@@ -1454,9 +1453,9 @@ i(client_flow_blocked, #ch{limiter_pid = LimiterPid}) ->
i(Item, _) ->
throw({bad_argument, Item}).
-maybe_incr_redeliver(true, QPid, State) ->
+maybe_incr_redeliver_stats(true, QPid, State) ->
maybe_incr_stats([{QPid, 1}], redeliver, State);
-maybe_incr_redeliver(_, _, _) ->
+maybe_incr_redeliver_stats(_, _, _) ->
ok.
maybe_incr_stats(QXIncs, Measure, #ch{stats_timer = StatsTimer}) ->