summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2010-08-07 22:29:06 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2010-08-07 22:29:06 +0100
commit7b792312738d1042ad65b702c635fa79d80b5264 (patch)
tree217e809f6b0fbfb058955487d02c953e7ac486f9
parent19e5b629dc24ff8669b582051909084db71c294b (diff)
downloadrabbitmq-server-7b792312738d1042ad65b702c635fa79d80b5264.tar.gz
cosmetic
- we only use quoted atoms in types and when quoting is needed - make existence check total - if it's the wrong type code further down the chain will barf anyway
-rw-r--r--src/rabbit_binary_generator.erl4
-rw-r--r--src/rabbit_binary_parser.erl4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_binary_generator.erl b/src/rabbit_binary_generator.erl
index f0ec6180..f7a34090 100644
--- a/src/rabbit_binary_generator.erl
+++ b/src/rabbit_binary_generator.erl
@@ -279,9 +279,9 @@ check_empty_content_body_frame_size() ->
ComputedSize, ?EMPTY_CONTENT_BODY_FRAME_SIZE})
end.
-ensure_content_encoded(Content = #content{properties_bin = PropsBin,
+ensure_content_encoded(Content = #content{properties_bin = PropBin,
protocol = Protocol}, Protocol)
- when PropsBin =/= 'none' ->
+ when PropBin =/= none ->
Content;
ensure_content_encoded(Content = #content{properties = Props}, Protocol) ->
Content#content{properties_bin = Protocol:encode_properties(Props),
diff --git a/src/rabbit_binary_parser.erl b/src/rabbit_binary_parser.erl
index b5ac4c66..ebf063f0 100644
--- a/src/rabbit_binary_parser.erl
+++ b/src/rabbit_binary_parser.erl
@@ -163,11 +163,11 @@ parse_property(table, <<Len:32/unsigned, Table:Len/binary, Rest/binary>>) ->
{parse_table(Table), Rest}.
ensure_content_decoded(Content = #content{properties = Props})
- when Props =/= 'none' ->
+ when Props =/= none ->
Content;
ensure_content_decoded(Content = #content{properties_bin = PropBin,
protocol = Protocol})
- when is_binary(PropBin) ->
+ when PropBin =/= none ->
Content#content{properties = Protocol:decode_properties(
Content#content.class_id, PropBin)}.