You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Gordon Sim (JIRA)" <ji...@apache.org> on 2013/05/08 16:19:16 UTC

[jira] [Assigned] (QPID-4820) Variant decoding/conversion incorrect for at least bin8, int8, uint8 data types

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

Gordon Sim reassigned QPID-4820:
--------------------------------

    Assignee: Gordon Sim
    
> Variant decoding/conversion incorrect for at least bin8, int8, uint8 data types
> -------------------------------------------------------------------------------
>
>                 Key: QPID-4820
>                 URL: https://issues.apache.org/jira/browse/QPID-4820
>             Project: Qpid
>          Issue Type: Bug
>            Reporter: Andy Goldstein
>            Assignee: Gordon Sim
>
> In the toVariant method in Codecs.cpp (https://github.com/apache/qpid/blob/trunk/qpid/cpp/src/qpid/amqp_0_10/Codecs.cpp#L99), the case statements for bin8, int8, and uint8 are incorrect.
> bin8 should be 0x00 (it's currently 0x01)
> int8 should be 0x01 (it's currently 0x02)
> uint8 should be 0x02 (it's currently 0x03)
> If you send a message like
> message.getProperties["key"] = boost::uint8_t(255)
> When you receive it, the value of that property comes out as -1, as the client incorrectly decodes the uint8 as an int8.
> It might be worth reviewing the entire switch block to see if anything else needs adjusting.

--
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