This is great - many thanks for the help! From: Alan Conway [mailto:acon...@redhat.com] Sent: 07 September 2018 16:10 To: users@qpid.apache.org Cc: n...@gmx.es Subject: Re: qpid-proton-cpp decoder.cpp - possible bug?
I think this is a bug I fixed recently, it should be in the latest release proton-0.25. If you still have a problem please raise a JIRA. Here's the fix - NULL is somewhat special but it is a valid scalar type, so I added it to type_id_is_scalar() https://github.com/alanconway/qpid-proton/commit/9e8edc17#diff-d6a2b218a8187976430ae388c2a9b176 On Thu, Sep 6, 2018 at 7:55 AM, <n...@gmx.es> wrote: Hi, Around line 180, decoder.cpp has the following: decoder& decoder::operator>>(scalar& x) { internal::state_guard sg(*this); type_id got = pre_get(); if (!type_id_is_scalar(got)) throw conversion_error("expected scalar, found "+type_name(got)); x.set(pn_data_get_atom(pn_object())); sg.cancel(); // No error, no rewind return *this; } When our client code is talking to a 3rd party system's broker, we find that the scalar in argument "x" is coming through from the other party as type NULL in some cases - which causes the throw in the above method to get triggered and then disconnects us from the broker. However, if we comment out the if/throw from the code in decoder.cpp, everything then appears to be workding 100% correctly. Is there a correct way to do this without removing the throw? - it seems that if the check is there it must have a purpose, so by removing the check I am probably opening myself up to some other issues further down the line? Thanks N --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional commands, e-mail: users-h...@qpid.apache.org