You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2013/12/20 14:48:44 UTC
svn commit: r1552669 - /qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp
Author: gsim
Date: Fri Dec 20 13:48:44 2013
New Revision: 1552669
URL: http://svn.apache.org/r1552669
Log:
QPID-5440: don't remove alternate-exchange from topic's management properties (just from queue arguments)
Modified:
qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp?rev=1552669&r1=1552668&r2=1552669&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Topic.cpp Fri Dec 20 13:48:44 2013
@@ -48,12 +48,12 @@ bool testProperty(const std::string& k,
else return i->second;
}
-qpid::types::Variant::Map filter(const qpid::types::Variant::Map& properties)
+qpid::types::Variant::Map filter(const qpid::types::Variant::Map& properties, bool queue)
{
qpid::types::Variant::Map filtered = properties;
filtered.erase(DURABLE);
filtered.erase(EXCHANGE);
- filtered.erase(ALTERNATE_EXCHANGE);
+ if (queue) filtered.erase(ALTERNATE_EXCHANGE);
return filtered;
}
}
@@ -65,13 +65,13 @@ Topic::Topic(Broker& broker, const std::
if (exchange->getName().empty()) throw qpid::Exception("Exchange must be specified.");
qpid::types::Variant::Map unused;
- qpid::types::Variant::Map filtered = filter(properties);
+ qpid::types::Variant::Map filtered = filter(properties, true);
policy.populate(filtered, unused);
qpid::management::ManagementAgent* agent = broker.getManagementAgent();
if (agent != 0) {
topic = _qmf::Topic::shared_ptr(new _qmf::Topic(agent, this, name, exchange->GetManagementObject()->getObjectId(), durable));
- topic->set_properties(filtered);
+ topic->set_properties(filter(properties, false));
agent->addObject(topic);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org