diff options
author | Matthias Radestock <matthias@lshift.net> | 2009-08-24 18:15:56 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@lshift.net> | 2009-08-24 18:15:56 +0100 |
commit | 1643873149b10f2ada1cd809a2266522eaa2fda8 (patch) | |
tree | 73e4aeec9cd96fa053cb9862d391e1c9390940f4 | |
parent | 1efae19ce63d2b91d2952ca523a4bd0e19e5d23e (diff) | |
download | rabbitmq-server-1643873149b10f2ada1cd809a2266522eaa2fda8.tar.gz |
cosmetic
-rw-r--r-- | src/rabbit_disk_queue.erl | 3 | ||||
-rw-r--r-- | src/rabbit_mixed_queue.erl | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/rabbit_disk_queue.erl b/src/rabbit_disk_queue.erl index 70d44845..ef4ff74e 100644 --- a/src/rabbit_disk_queue.erl +++ b/src/rabbit_disk_queue.erl @@ -1861,8 +1861,7 @@ read_message_from_disk(FileHdl, TotalSize) -> end. scan_file_for_valid_messages(File) -> - FilePath = form_filename(File), - case file:open(FilePath, [raw, binary, read]) of + case file:open(form_filename(File), [raw, binary, read]) of {ok, Hdl} -> Valid = scan_file_for_valid_messages(Hdl, 0, []), %% if something really bad's happened, the close could fail, but ignore diff --git a/src/rabbit_mixed_queue.erl b/src/rabbit_mixed_queue.erl index 9ead773d..08d45094 100644 --- a/src/rabbit_mixed_queue.erl +++ b/src/rabbit_mixed_queue.erl @@ -317,8 +317,7 @@ publish_delivered(Msg = #basic_message { guid = MsgId, length = 0 }) when IsDurable andalso IsPersistent -> ok = rabbit_disk_queue:publish(Q, Msg, true), - MsgSize = size_of_message(Msg), - State1 = gain_memory(MsgSize, State), + State1 = gain_memory(size_of_message(Msg), State), %% must call phantom_fetch otherwise the msg remains at the head %% of the queue. This is synchronous, but unavoidable as we need %% the AckTag |