summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/UpdateExchange.cpp
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2011-07-19 19:57:06 +0000
committerKim van der Riet <kpvdr@apache.org>2011-07-19 19:57:06 +0000
commit7cebcbdcc8cd641faa82d2eb89ecc723cc21a21b (patch)
tree4c68b91d7738178edfd17d30afd1887982a9d670 /cpp/src/qpid/cluster/UpdateExchange.cpp
parent99a80aaed15489cde434c26cb5a951063d3f64a6 (diff)
downloadqpid-python-7cebcbdcc8cd641faa82d2eb89ecc723cc21a21b.tar.gz
QPID-3304: Patch from Gordon Sim plus tests which detect the condition being solved. Added a make check-long target to the Makefile in the cpp dir to make it easier to run the long tests.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1148503 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/UpdateExchange.cpp')
-rw-r--r--cpp/src/qpid/cluster/UpdateExchange.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/cluster/UpdateExchange.cpp b/cpp/src/qpid/cluster/UpdateExchange.cpp
index e830459aba..cb1376004e 100644
--- a/cpp/src/qpid/cluster/UpdateExchange.cpp
+++ b/cpp/src/qpid/cluster/UpdateExchange.cpp
@@ -49,18 +49,18 @@ void UpdateExchange::setProperties(const boost::intrusive_ptr<broker::Message>&
// Copy expiration from x-property if present.
if (msg->hasProperties<MessageProperties>()) {
- MessageProperties* mprops = msg->getProperties<MessageProperties>();
+ const MessageProperties* mprops = msg->getProperties<MessageProperties>();
if (mprops->hasApplicationHeaders()) {
- FieldTable& headers = mprops->getApplicationHeaders();
+ const FieldTable& headers = mprops->getApplicationHeaders();
if (headers.isSet(UpdateClient::X_QPID_EXPIRATION)) {
msg->setExpiration(
sys::AbsTime(sys::EPOCH, headers.getAsInt64(UpdateClient::X_QPID_EXPIRATION)));
- headers.erase(UpdateClient::X_QPID_EXPIRATION);
+ msg->removeCustomProperty(UpdateClient::X_QPID_EXPIRATION);
// Erase props/headers that were added by the UpdateClient
if (headers.isSet(UpdateClient::X_QPID_NO_MESSAGE_PROPS))
msg->eraseProperties<MessageProperties>();
else if (headers.isSet(UpdateClient::X_QPID_NO_HEADERS))
- mprops->clearApplicationHeadersFlag();
+ msg->clearApplicationHeadersFlag();
}
}
}