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 | 0d05ba73eb3c894ebccc27555e43734a5283b637 (patch) | |
| tree | 73e4aeec9cd96fa053cb9862d391e1c9390940f4 | |
| parent | cdb228fbb76aa640b3043ba53d460ca3a9717de9 (diff) | |
| download | rabbitmq-server-git-0d05ba73eb3c894ebccc27555e43734a5283b637.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 70d448451a..ef4ff74e8d 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 9ead773de9..08d45094bb 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 |
