[ https://issues.apache.org/jira/browse/QPID-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022265#comment-13022265 ]
jirapos...@reviews.apache.org commented on QPID-3222: ----------------------------------------------------- ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/627/#review506 ----------------------------------------------------------- 1. To be complete the equality tests must propagate to the .NET binding as well. See patch below. 2. This patch changes the API/ABI a little does it not? For the .NET case assume you have Duration A(100) and Duration B(100). Before this patch A==B is false and after this patch A==B is true. How can we sell that? -Chuck Index: qpid/cpp/bindings/qpid/dotnet/src/Duration.h =================================================================== --- qpid/cpp/bindings/qpid/dotnet/src/Duration.h (revision 1089977) +++ qpid/cpp/bindings/qpid/dotnet/src/Duration.h (working copy) @@ -81,8 +81,18 @@ Duration ^ result = gcnew Duration(multiplier * dur->Milliseconds); return result; } - }; + static bool operator == (Duration ^ a, Duration ^ b) + { + return a->Milliseconds == b->Milliseconds; + } + + static bool operator != (Duration ^ a, Duration ^ b) + { + return a->Milliseconds != b->Milliseconds; + } +}; + public ref class DurationConstants sealed { private: - Chug On 2011-04-20 16:47:00, Gordon Sim wrote: bq. bq. ----------------------------------------------------------- bq. This is an automatically generated e-mail. To reply, visit: bq. https://reviews.apache.org/r/627/ bq. ----------------------------------------------------------- bq. bq. (Updated 2011-04-20 16:47:00) bq. bq. bq. Review request for qpid, Andrew Stitcher, Alan Conway, Chug Rolke, and Steve Huston. bq. bq. bq. Summary bq. ------- bq. bq. Fixes ttl overflow on the broker. Added equality operator for qpid::messaging::Duration (needed it in test and seemed generally valuable). bq. bq. bq. This addresses bug QPID-3222. bq. https://issues.apache.org/jira/browse/QPID-3222 bq. bq. bq. Diffs bq. ----- bq. bq. /trunk/qpid/cpp/include/qpid/messaging/Duration.h 1090157 bq. /trunk/qpid/cpp/src/qpid/broker/Message.cpp 1090157 bq. /trunk/qpid/cpp/src/qpid/messaging/Duration.cpp 1090157 bq. /trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp 1090157 bq. bq. Diff: https://reviews.apache.org/r/627/diff bq. bq. bq. Testing bq. ------- bq. bq. New test added, make check passes. bq. bq. bq. Thanks, bq. bq. Gordon bq. bq. > Potentially TTL Overflow > ------------------------ > > Key: QPID-3222 > URL: https://issues.apache.org/jira/browse/QPID-3222 > Project: Qpid > Issue Type: Bug > Components: C++ Broker > Reporter: Jerome Ajot > Assignee: Gordon Sim > Labels: ttl > > When a message TTL is set by the client to Duration::FOREVER, the message is > not reachable anymore. > Every addition and multiplication to the TTL/Expiration Time should check to > avoid uint64_t overflow. > For example: broker/Message.cpp: Message::setTimestamp() overflows the > uint64_t. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org