From 6fd0e8f1d57d9cf9e6aaca88414cccd742e28db4 Mon Sep 17 00:00:00 2001 From: Tony Roussel Date: Tue, 23 Nov 2021 16:00:02 +0100 Subject: [PATCH] fix wrong exchange type check in ChannelImpl::declareExchange --- src/channelimpl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/channelimpl.cpp b/src/channelimpl.cpp index 326b355..451ece6 100644 --- a/src/channelimpl.cpp +++ b/src/channelimpl.cpp @@ -285,12 +285,12 @@ Deferred &ChannelImpl::declareExchange(const std::string &name, ExchangeType typ const char *exchangeType = ""; // convert the exchange type into a string - if (type == ExchangeType::fanout) exchangeType = "fanout"; - else if (type == ExchangeType::direct) exchangeType = "direct"; - else if (type == ExchangeType::topic) exchangeType = "topic"; - else if (type == ExchangeType::headers) exchangeType = "headers"; - else if (type == ExchangeType::consistent_hash) exchangeType = "x-consistent-hash"; - else if (type == ExchangeType::consistent_hash) exchangeType = "x-message-deduplication"; + if (type == ExchangeType::fanout) exchangeType = "fanout"; + else if (type == ExchangeType::direct) exchangeType = "direct"; + else if (type == ExchangeType::topic) exchangeType = "topic"; + else if (type == ExchangeType::headers) exchangeType = "headers"; + else if (type == ExchangeType::consistent_hash) exchangeType = "x-consistent-hash"; + else if (type == ExchangeType::message_deduplication) exchangeType = "x-message-deduplication"; // the boolean options bool passive = (flags & AMQP::passive) != 0;