summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2011-06-03 16:04:43 +0000
committerGordon Sim <gsim@apache.org>2011-06-03 16:04:43 +0000
commit344738869e4e22687d09e0599973351a66a53a6a (patch)
tree95efbb44b9af8147b9fb9bb2d5cb3203d7bec789 /qpid/cpp
parentac75d66d0da6628f6cc228bdda37ebeecec93079 (diff)
downloadqpid-python-344738869e4e22687d09e0599973351a66a53a6a.tar.gz
QPID-3291: Applied patch fron Andy Goldstein to ensure that expiration is not lost when adjusting ttl
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1131084 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/broker/Message.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/Message.cpp b/qpid/cpp/src/qpid/broker/Message.cpp
index 763dc55e40..7545e4941f 100644
--- a/qpid/cpp/src/qpid/broker/Message.cpp
+++ b/qpid/cpp/src/qpid/broker/Message.cpp
@@ -387,7 +387,7 @@ void Message::adjustTtl()
sys::Mutex::ScopedLock l(lock);
if (expiration < FAR_FUTURE) {
sys::Duration d(sys::AbsTime::now(), getExpiration());
- props->setTtl(int64_t(d) > 0 ? int64_t(d)/1000000 : 1); // convert from ns to ms; set to 1 if expired
+ props->setTtl(int64_t(d) >= 1000000 ? int64_t(d)/1000000 : 1); // convert from ns to ms; set to 1 if expired
}
}
}