diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-07 22:29:06 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-07 22:29:06 +0100 |
| commit | 1dbeefe4b8d18c88fa5aee1b3adcd20da0e2dd94 (patch) | |
| tree | 217e809f6b0fbfb058955487d02c953e7ac486f9 /src | |
| parent | f525e17989d7bbb0e563d37f837da8880a27172c (diff) | |
| download | rabbitmq-server-git-1dbeefe4b8d18c88fa5aee1b3adcd20da0e2dd94.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
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_binary_generator.erl | 4 | ||||
| -rw-r--r-- | src/rabbit_binary_parser.erl | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/rabbit_binary_generator.erl b/src/rabbit_binary_generator.erl index f0ec618044..f7a3409006 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 b5ac4c66e6..ebf063f031 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)}. |
