diff options
| author | Alan Conway <aconway@apache.org> | 2009-10-05 15:08:25 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-10-05 15:08:25 +0000 |
| commit | 4f80172fc8a66475045df2299b45c4eb6d46a1b2 (patch) | |
| tree | 3b80ced1287ae02a67264c64e23c86d57cd99582 /cpp/src/qpid/client/SessionImpl.cpp | |
| parent | 6dec488633e43e6a4ebe95fb8289f73d70d00867 (diff) | |
| download | qpid-python-4f80172fc8a66475045df2299b45c4eb6d46a1b2.tar.gz | |
Fixed: cluster udpate did not presever deliver-properties.exchange on messages.
Also minor improvements:
- Improved debug logging for consumers.
- Cluster tests scripts work with latest corosync: don't check/set ais group.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@821830 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/SessionImpl.cpp')
| -rw-r--r-- | cpp/src/qpid/client/SessionImpl.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/cpp/src/qpid/client/SessionImpl.cpp b/cpp/src/qpid/client/SessionImpl.cpp index 8ead44a172..32541dceac 100644 --- a/cpp/src/qpid/client/SessionImpl.cpp +++ b/cpp/src/qpid/client/SessionImpl.cpp @@ -64,7 +64,8 @@ SessionImpl::SessionImpl(const std::string& name, boost::shared_ptr<ConnectionIm proxy(ioHandler), nextIn(0), nextOut(0), - sendMsgCredit(0) + sendMsgCredit(0), + doClearDeliveryPropertiesExchange(true) { channel.next = connectionShared.get(); } @@ -396,11 +397,16 @@ void SessionImpl::sendContent(const MethodContent& content) { AMQFrame header(content.getHeader()); - // Client is not allowed to set the delivery-properties.exchange. - AMQHeaderBody* headerp = static_cast<AMQHeaderBody*>(header.getBody()); - if (headerp && headerp->get<DeliveryProperties>()) - headerp->get<DeliveryProperties>(true)->clearExchangeFlag(); - + // doClearDeliveryPropertiesExchange is set by cluster update client so + // it can send messages with delivery-properties.exchange set. + // + if (doClearDeliveryPropertiesExchange) { + // Normal client is not allowed to set the delivery-properties.exchange + // so clear it here. + AMQHeaderBody* headerp = static_cast<AMQHeaderBody*>(header.getBody()); + if (headerp && headerp->get<DeliveryProperties>()) + headerp->get<DeliveryProperties>(true)->clearExchangeFlag(); + } header.setFirstSegment(false); uint64_t data_length = content.getData().length(); if(data_length > 0){ |
