From e0227cc4cfd9d8979758b7c2aea485b4bf20f4ed Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 3 Jun 2011 16:04:43 +0000 Subject: 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/qpid@1131084 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Message.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpp') diff --git a/cpp/src/qpid/broker/Message.cpp b/cpp/src/qpid/broker/Message.cpp index 763dc55e40..7545e4941f 100644 --- a/cpp/src/qpid/broker/Message.cpp +++ b/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 } } } -- cgit v1.2.1