You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Fraser Adams <fr...@blueyonder.co.uk> on 2011/12/17 11:01:35 UTC
Re: Question about QPID-3492
Just an update,
I've just tested with an address of:
string address = "testqueue; {create: receiver, node: {x-declare:
{arguments: {'qpid.policy_type': ring, 'qpid.max_size': 500000000}},
x-bindings: [{exchange: 'amq.match', queue: 'testqueue', key: 'data1',
arguments: {x-match: all, data-service: 'amqp-delivery', item-owner:
'fadams'}}]}}";
i.e. a mixture of quoted and non-quoted and it fails, so it looks like
the tweak to readQuotedValue is in fact needed, I'll update the original
Jira with a new patch.
Frase
Fraser Adams wrote:
> Hi
> I was going through some mails from a little while back covering an
> issue with the qpid::messaging ***AddressParser.cpp
> <http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/messaging/AddressParser.cpp?view=log&pathrev=1171715>*
>
>
> Gordon Sim raised a Jira
>
> https://issues.apache.org/jira/browse/QPID-3492
>
> I was planning on taking a look at this, but I noticed that it was
> marked as fixed in 0.13.
>
> I took a look and the fix is as follows:
>
> --- qpid/trunk/qpid/cpp/src/qpid/messaging/AddressParser.cpp
> 2011/09/16 18:44:39 1171714
> +++ qpid/trunk/qpid/cpp/src/qpid/messaging/AddressParser.cpp
> 2011/09/16 18:44:59 1171715
> @@ -201,7 +201,8 @@
> {
> std::string s;
> if (readWord(s)) {
> - value.parse(s); + value.parse(s);
> + if (value.getType() == VAR_STRING) value.setEncoding("utf8");
> return true;
> } else {
> return false;
>
>
> This looks great however (and please excuse my ignorance of how
> AddressParser and Variant work) but this patch is applied to
> readSimpleValue() but shouldn't a similar thing be applied to the
> readQuotedValue() method too?
>
> bool AddressParser::readQuotedValue(Variant& value)
> {
> std::string s;
> if (readQuotedString(s)) {
> value = s;
>
> value.setEncoding("utf8");
>
> return true;
> } else {
> return false;
> }
> }
>
> I would think that this would be necessary too wouldn't it? I took a
> look at Variant& Variant::operator=(const std::string& s) and there's
> no setEncoding() going on and the impl = new
> VariantImpl(std::string(s)); inside it looks like it uses the default
> encoding.
>
> Have I missed something?
> Regards,
> Frase
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org