[ https://issues.apache.org/jira/browse/QPID-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gordon Sim reassigned QPID-4556: -------------------------------- Assignee: Gordon Sim > QueueOptions::setSizePolicy() can cause exception > ------------------------------------------------- > > Key: QPID-4556 > URL: https://issues.apache.org/jira/browse/QPID-4556 > Project: Qpid > Issue Type: Bug > Components: C++ Broker, C++ Client > Affects Versions: 0.20 > Environment: Linux x86_64 > Reporter: Brad Hoekstra > Assignee: Gordon Sim > Attachments: QPID-4556.diff > > > Calling QueueOptions::setSizePolicy() with maxSize > 2GB causes an exception > in the C++ broken, which then generates an exception in the C++ client > library. > This appears to be because the value is set as an int32 in the FieldTable. > The fix appears to be fairly simple: > {noformat} > Index: 0.20/cpp/src/qpid/client/QueueOptions.cpp > =================================================================== > --- 0.20/cpp/src/qpid/client/QueueOptions.cpp (revision 27169) > +++ 0.20/cpp/src/qpid/client/QueueOptions.cpp (revision 27170) > @@ -49,8 +49,8 @@ > > void QueueOptions::setSizePolicy(QueueSizePolicy sp, uint64_t maxSize, > uint32_t maxCount) > { > - if (maxCount) setInt(strMaxCountKey, maxCount); > - if (maxSize) setInt(strMaxSizeKey, maxSize); > + if (maxCount) setUInt64(strMaxCountKey, maxCount); > + if (maxSize) setUInt64(strMaxSizeKey, maxSize); > if (maxSize || maxCount){ > switch (sp) > { > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org