On Thu, Jan 9, 2014 at 10:29 AM, Darryl L. Pierce <dpie...@redhat.com>wrote:

> On Thu, Jan 09, 2014 at 10:19:36AM -0500, Rafael Schloming wrote:
> > Well, proton/error.h defines -9 to be PN_INPROGRESS, however given that
> > this is the source code of pn_messenger_set_blocking:
> >
> > int pn_messenger_set_blocking(pn_messenger_t *messenger, bool blocking)
> > {
> >   messenger->blocking = blocking;
> >   return 0;
> > }
> >
> > I don't see how it's possible for it to return anything other than 0.
>
> Sorry, I meant that I'm getting a -9 error condition on calling
> pn_messenger_receive when blocking is set to 0.
>
> I added to perl.i a conversion for the bool type so that it Perl->C
> would use true/false and for C->Perl would use 1/undef. With that done
> the Perl bindings stopped getting a -9 on calling receive.
>
> I'll post it on Review Board once I get it working (I'm writing a Perl
> version of {send,recv}_async to test this new feature).
>

In the case of the C API getting a PN_INPROGRESS error (-9) from recv is
expected behaviour if you're in non blocking mode. That just means that
there is blocking work that was deferred.

--Rafael

Reply via email to