From 174ab5db4c74703189eb4d0a96c58feb1bce3ef1 Mon Sep 17 00:00:00 2001 From: Matthew Sackman Date: Fri, 9 Apr 2010 17:55:00 +0100 Subject: cosmetics --- include/rabbit.hrl | 3 ++- src/rabbit_channel.erl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/rabbit.hrl b/include/rabbit.hrl index 81b95c39..0cf6a100 100644 --- a/include/rabbit.hrl +++ b/include/rabbit.hrl @@ -62,7 +62,8 @@ -record(listener, {node, protocol, host, port}). --record(basic_message, {exchange_name, routing_key, content, guid, is_persistent}). +-record(basic_message, {exchange_name, routing_key, content, guid, + is_persistent}). -record(ssl_socket, {tcp, ssl}). -record(delivery, {mandatory, immediate, txn, sender, message}). diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 3fe86408..847d4df2 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -383,11 +383,12 @@ handle_method(#'basic.publish'{exchange = ExchangeNameBin, %% We decode the content's properties here because we're almost %% certain to want to look at delivery-mode and priority. DecodedContent = rabbit_binary_parser:ensure_content_decoded(Content), + IsPersistent = is_message_persistent(DecodedContent), Message = #basic_message{exchange_name = ExchangeName, routing_key = RoutingKey, content = DecodedContent, guid = rabbit_guid:guid(), - is_persistent = is_message_persistent(DecodedContent)}, + is_persistent = IsPersistent}, {RoutingRes, DeliveredQPids} = rabbit_exchange:publish( Exchange, -- cgit v1.2.1