Re: pn_messenger_send return code

2014-01-11 Thread Fraser Adams
Out of curiosity which version of Proton are you using? I *think* that's 
a fairly recent fix.


I was seeing something similar in my asynchronous experiments (I needed 
to figure out when the message actually reached the receiver so I could 
hold off terminating my async producer until then) and Rafael put a fix 
onto Proton trunk - that'd be ~3-4 weeks ago.


It might be worth you trying a build off trunk.

Regards,
Frase

On 10/01/14 22:43, serega wrote:

Thanks for your reply. I added the tracker, but with the same scenario it
returns 0 which is PN_STATUS_UNKNOWN = 0.
-
Error 0
read: Connection refused
[0x100810800:0] ERROR[-2] SASL header mismatch: ''
send: Broken pipe
CONNECTION ERROR connection aborted
Error 0
Status off M1: 0
---
It looks like internally messenger prints error messages, but it doesn't
communicate with the client about the error. The unknown status isn't very
meaningful.

Sergey.



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/pn-messenger-send-return-code-tp7602570p7602587.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.




Re: pn_messenger_send return code

2014-01-11 Thread serega
I didn't insert the line in the code as was suggested by Rafael
pn_messenger_set_outgoing_window(messenger, N);

With that change I get PN_STATUS_ABORTED = 6 when the link is broken.

I do have another problem though. I get the following errors sometimes..

./send -a  amqp://guest:guest@127.0.0.1:5672/testqueue
[0x7fdf48700a10]:ERROR[-2] SASL header mismatch:
'\x00\x00\x00\x17\x02\x01\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00D\xc0\x03\x01P\x00AMQP\x03\x01\x00\x00\x00\x00\x00B\x02\x01\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00@\xc0.\x01\xe0+\x05\xa3\x04NTLM\x05PLAIN\x09ANONYMOUS\x0aDIGEST-MD5\x08CRAM-MD5'


sergey:Debug sergey$ for i in {1..5000} ; do  ./send -a 
amqp://guest:guest@127.0.0.1:5672/testqueue; done
[0x7fb0c1406670]:ERROR[-2] SASL header mismatch:
'\x00\x00\x00\x17\x02\x01\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00D\xc0\x03\x01P\x00AMQP\x03\x01\x00\x00\x00\x00\x00B\x02\x01\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00@\xc0.\x01\xe0+\x05\xa3\x0aDIGEST-MD5\x08CRAM-MD5\x04NTLM\x05PLAIN\x09ANONYMOUS'


The client simply hangs after reporting this error. I stepped in debugger
and found that the call doesn't return from  pn_driver_wait(). 




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/pn-messenger-send-return-code-tp7602570p7602616.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.