summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionAdapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionAdapter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp
index 1a802cb2bd..5e5d79343a 100644
--- a/cpp/src/qpid/broker/SessionAdapter.cpp
+++ b/cpp/src/qpid/broker/SessionAdapter.cpp
@@ -85,8 +85,8 @@ void SessionAdapter::ExchangeHandlerImpl::declare(const string& exchange, const
checkType(actual, type);
checkAlternate(actual, alternate);
}else{
- if(exchange.find("amq.") == 0) {
- throw framing::NotAllowedException(QPID_MSG("Exchange names beginning with \"amq.\" are reserved. (exchange=\"" << exchange << "\")"));
+ if(exchange.find("amq.") == 0 || exchange.find("qpid.") == 0) {
+ throw framing::NotAllowedException(QPID_MSG("Exchange names beginning with \"amq.\" or \"qpid.\" are reserved. (exchange=\"" << exchange << "\")"));
}
try{
std::pair<Exchange::shared_ptr, bool> response = getBroker().getExchanges().declare(exchange, type, durable, args);