qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Sim (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (QPID-4556) QueueOptions::setSizePolicy() can cause exception
Date Wed, 06 Feb 2013 10:50:14 GMT

     [ https://issues.apache.org/jira/browse/QPID-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gordon Sim resolved QPID-4556.
------------------------------

    Resolution: Fixed

Patch applied: http://svn.apache.org/viewvc?view=revision&revision=1442898. Thanks Brad!
                
> 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-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message