diff options
| author | Rob Harrop <rob@rabbitmq.com> | 2010-11-25 15:00:06 +0000 |
|---|---|---|
| committer | Rob Harrop <rob@rabbitmq.com> | 2010-11-25 15:00:06 +0000 |
| commit | 2270af6909510f1952de4e62ebf287116888add4 (patch) | |
| tree | 425fcf3babb76fc4483bec0d50d27432a58cedae /src | |
| parent | 44cc17d8110f2da5282294ee3e1a50362f09e046 (diff) | |
| download | rabbitmq-server-git-2270af6909510f1952de4e62ebf287116888add4.tar.gz | |
cosmetic changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 10 | ||||
| -rw-r--r-- | src/rabbit_channel.erl | 3 | ||||
| -rw-r--r-- | src/rabbit_msg_store.erl | 3 | ||||
| -rw-r--r-- | src/rabbit_reader.erl | 5 | ||||
| -rw-r--r-- | src/rabbit_variable_queue.erl | 12 |
5 files changed, 20 insertions, 13 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index d7066e2fc5..3dbd2b2299 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 0b6e10e576..b2e6658b29 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 96d67ad4cf..fea7d4a86b 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 71115a73f8..c903665f4f 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 5dbfa62b4e..27e482d5e2 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, |
