diff options
| author | Ted Ross <tross@apache.org> | 2009-09-04 00:27:37 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2009-09-04 00:27:37 +0000 |
| commit | 1f167dbd032708567ec7c1fe639258db39e27cd7 (patch) | |
| tree | 5e3015ec7f592d2c9515d4230b4637b95c0fb263 /cpp | |
| parent | 7ea774cefb7e5fca499ae514e09a2a6b6dd199f8 (diff) | |
| download | qpid-python-1f167dbd032708567ec7c1fe639258db39e27cd7.tar.gz | |
QPID-2080 - crash when attempting to modify an exchange's alternate
Committed patch from Ken Giusti
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@811188 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/src/qpid/broker/SessionAdapter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp index b0c5e9ea00..af07605552 100644 --- a/cpp/src/qpid/broker/SessionAdapter.cpp +++ b/cpp/src/qpid/broker/SessionAdapter.cpp @@ -121,9 +121,11 @@ void SessionAdapter::ExchangeHandlerImpl::checkType(Exchange::shared_ptr exchang void SessionAdapter::ExchangeHandlerImpl::checkAlternate(Exchange::shared_ptr exchange, Exchange::shared_ptr alternate) { - if (alternate && alternate != exchange->getAlternate()) + if (alternate && ((exchange->getAlternate() && alternate != exchange->getAlternate()) + || !exchange->getAlternate())) throw NotAllowedException(QPID_MSG("Exchange declared with alternate-exchange " - << exchange->getAlternate()->getName() << ", requested " + << (exchange->getAlternate() ? exchange->getAlternate()->getName() : "<nonexistent>") + << ", requested " << alternate->getName())); } |
