summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Harrop <rob@rabbitmq.com>2010-11-25 15:00:06 +0000
committerRob Harrop <rob@rabbitmq.com>2010-11-25 15:00:06 +0000
commitb69f323741a72d28dba7d859bfa48c0fc7860fcd (patch)
tree425fcf3babb76fc4483bec0d50d27432a58cedae
parent4ea8598d86f9a670d137ab2b5086e1db0f81c10e (diff)
downloadrabbitmq-server-b69f323741a72d28dba7d859bfa48c0fc7860fcd.tar.gz
cosmetic changes
-rw-r--r--src/rabbit_amqqueue_process.erl10
-rw-r--r--src/rabbit_channel.erl3
-rw-r--r--src/rabbit_msg_store.erl3
-rw-r--r--src/rabbit_reader.erl5
-rw-r--r--src/rabbit_variable_queue.erl12
5 files changed, 20 insertions, 13 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index d7066e2f..3dbd2b22 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -450,8 +450,9 @@ record_confirm_message(#delivery{sender = ChPid,
message = #basic_message {
is_persistent = true,
guid = Guid}},
- State = #q{guid_to_channel = GTC,
- q = #amqqueue{durable = true}}) ->
+ State =
+ #q{guid_to_channel = GTC,
+ q = #amqqueue{durable = true}}) ->
State#q{guid_to_channel = dict:store(Guid, {ChPid, MsgSeqNo}, GTC)};
record_confirm_message(_Delivery, State) ->
State.
@@ -859,8 +860,9 @@ handle_call({basic_get, ChPid, NoAck}, _From,
case AckRequired of
true -> C = #cr{acktags = ChAckTags} = ch_record(ChPid),
true = maybe_store_ch_record(
- C#cr{acktags = sets:add_element(AckTag,
- ChAckTags)}),
+ C#cr{acktags =
+ sets:add_element(AckTag,
+ ChAckTags)}),
State2;
false -> confirm_message(Message, State2)
end,
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 0b6e10e5..b2e6658b 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -471,7 +471,8 @@ send_or_enqueue_ack(MsgSeqNo, QPid, State = #ch{confirm_multiple = true}) ->
do_if_unconfirmed(
MsgSeqNo, QPid,
fun(MSN, State1 = #ch{held_confirms = As}) ->
- start_confirm_timer(State1#ch{held_confirms = gb_sets:add(MSN, As)})
+ start_confirm_timer(
+ State1#ch{held_confirms = gb_sets:add(MSN, As)})
end, State).
do_if_unconfirmed(MsgSeqNo, QPid, ConfirmFun,
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl
index 96d67ad4..fea7d4a8 100644
--- a/src/rabbit_msg_store.erl
+++ b/src/rabbit_msg_store.erl
@@ -727,7 +727,8 @@ handle_cast({write, CRef, Guid},
ok = index_update_ref_count(Guid, RefCount + 1, State1),
CTG2 = case {dict:find(CRef, CODC), File} of
{{ok, _}, CurFile} -> CTG1;
- {{ok, Fun}, _} -> Fun(gb_sets:singleton(Guid)), CTG;
+ {{ok, Fun}, _} -> Fun(gb_sets:singleton(Guid)),
+ CTG;
_ -> CTG1
end,
noreply(State #msstate { cref_to_guids = CTG2 })
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 71115a73..c903665f 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -590,8 +590,9 @@ handle_frame(Type, Channel, Payload,
%% We're already closing this channel, so
%% there's no cleanup to do (notify
%% queues, etc.)
- ok = rabbit_writer:send_command(State#v1.sock,
- #'channel.close_ok'{});
+ ok = rabbit_writer:send_command(
+ State#v1.sock,
+ #'channel.close_ok'{});
_ -> ok
end,
State;
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl
index 5dbfa62b..27e482d5 100644
--- a/src/rabbit_variable_queue.erl
+++ b/src/rabbit_variable_queue.erl
@@ -523,7 +523,8 @@ publish_delivered(false, _Msg, _MsgProps, State = #vqstate { len = 0 }) ->
{blank_ack, a(State)};
publish_delivered(true, Msg = #basic_message { is_persistent = IsPersistent,
guid = Guid },
- MsgProps = #message_properties { needs_confirming = NeedsConfirming },
+ MsgProps = #message_properties {
+ needs_confirming = NeedsConfirming },
State = #vqstate { len = 0,
next_seq_id = SeqId,
out_counter = OutCount,
@@ -1366,10 +1367,11 @@ ack(MsgStoreFun, Fun, AckTags, State) ->
end, {{[], orddict:new()}, State}, AckTags),
IndexState1 = rabbit_queue_index:ack(SeqIds, IndexState),
AckdGuids = lists:concat(
- orddict:fold(fun (IsPersistent, Guids, Gs) ->
- MsgStoreFun(MSCState, IsPersistent, Guids),
- [Guids | Gs]
- end, [], GuidsByStore)),
+ orddict:fold(
+ fun (IsPersistent, Guids, Gs) ->
+ MsgStoreFun(MSCState, IsPersistent, Guids),
+ [Guids | Gs]
+ end, [], GuidsByStore)),
PCount1 = PCount - find_persistent_count(sum_guids_by_store_to_len(
orddict:new(), GuidsByStore)),
{AckdGuids, State1 #vqstate { index_state = IndexState1,