qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1131084 - /qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp
Date Fri, 03 Jun 2011 16:04:43 GMT
Author: gsim
Date: Fri Jun  3 16:04:43 2011
New Revision: 1131084

URL: http://svn.apache.org/viewvc?rev=1131084&view=rev
Log:
QPID-3291: Applied patch fron Andy Goldstein to ensure that expiration is not lost when adjusting
ttl

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp?rev=1131084&r1=1131083&r2=1131084&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Message.cpp Fri Jun  3 16:04:43 2011
@@ -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
         }
     }
 }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message