diff options
author | Matthew Sackman <matthew@lshift.net> | 2009-09-01 12:09:33 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@lshift.net> | 2009-09-01 12:09:33 +0100 |
commit | 590800c2b2711c79cc87981afc67b7f6d903532d (patch) | |
tree | c0d7c7589a4aa50c2a1b104efeadce5c60dd5c47 /src/rabbit_msg_file.erl | |
parent | 8a5b3cdf7c705d3e8194af0ac32c52e2a9780db5 (diff) | |
download | rabbitmq-server-git-590800c2b2711c79cc87981afc67b7f6d903532d.tar.gz |
Read through all of Matthias changes, no problems. In here, one cosmetic, and one change so that rmf:read returns the MsgId off disk to be later matched. This is purely defensive.
Diffstat (limited to 'src/rabbit_msg_file.erl')
-rw-r--r-- | src/rabbit_msg_file.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_msg_file.erl b/src/rabbit_msg_file.erl index 6cf11ac871..70b04c0900 100644 --- a/src/rabbit_msg_file.erl +++ b/src/rabbit_msg_file.erl @@ -70,13 +70,13 @@ read(FileHdl, TotalSize) -> MsgIdBinSize:?INTEGER_SIZE_BITS, Rest:SizeWriteOkBytes/binary>>} -> BodySize = Size - MsgIdBinSize, - <<_MsgId:MsgIdBinSize/binary, MsgBody:BodySize/binary, + <<MsgId:MsgIdBinSize/binary, MsgBody:BodySize/binary, StopByte:?WRITE_OK_SIZE_BITS>> = Rest, Persistent = case StopByte of ?WRITE_OK_TRANSIENT -> false; ?WRITE_OK_PERSISTENT -> true end, - {ok, {MsgBody, Persistent, BodySize}}; + {ok, {binary_to_term(MsgId), MsgBody, Persistent, BodySize}}; KO -> KO end. |