[ https://issues.apache.org/jira/browse/QPID-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022282#comment-13022282 ]
jirapos...@reviews.apache.org commented on QPID-3222: ----------------------------------------------------- bq. On 2011-04-20 18:04:37, Chug Rolke wrote: bq. > 1. To be complete the equality tests must propagate to the .NET binding as well. See patch below. bq. > bq. > 2. This patch changes the API/ABI a little does it not? bq. > For the .NET case assume you have Duration A(100) and Duration B(100). bq. > Before this patch A==B is false and after this patch A==B is true. bq. > How can we sell that? bq. > bq. > -Chuck bq. > bq. > bq. > Index: qpid/cpp/bindings/qpid/dotnet/src/Duration.h bq. > =================================================================== bq. > --- qpid/cpp/bindings/qpid/dotnet/src/Duration.h (revision 1089977) bq. > +++ qpid/cpp/bindings/qpid/dotnet/src/Duration.h (working copy) bq. > @@ -81,8 +81,18 @@ bq. > Duration ^ result = gcnew Duration(multiplier * dur->Milliseconds); bq. > return result; bq. > } bq. > - }; bq. > bq. > + static bool operator == (Duration ^ a, Duration ^ b) bq. > + { bq. > + return a->Milliseconds == b->Milliseconds; bq. > + } bq. > + bq. > + static bool operator != (Duration ^ a, Duration ^ b) bq. > + { bq. > + return a->Milliseconds != b->Milliseconds; bq. > + } bq. > +}; bq. > + bq. > public ref class DurationConstants sealed bq. > { bq. > private: bq. > As far as c++ API/ABI goes this is purely additive (it is a change but can't break anything). Prior to this change comparing two durations for equality would fail to compile due to the lack of equality operator. I would expect though that the semantic change from a .NET perspective would not only be acceptable but actually desired, no? - Gordon ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/627/#review506 ----------------------------------------------------------- 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