Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Paho Async callbacks

Hi Ian

Thank's for the support I will try that out a fill in a bug report.

I'm working with some other guys who actually did the porting work so I don't have the exact details, but I don't think there was too much to do. I will try to get some more info for you.

Mark
 

From: paho-dev-bounces@xxxxxxxxxxx on behalf of Ian Craggs
Sent: 30 April 2013 15:53
To: paho-dev@xxxxxxxxxxx
Subject: Re: [paho-dev] Paho Async callbacks
 
Hi Mark,

it's a bug.  If you change line 1303 in MQTTAsync.c from

	MQTTAsync_disconnect_internal(m, 0);

to
	MQTTProtocol_closeSession(m->c, 0);

you should find it works better.  I will raise a bug and fix it, unless you want to raise the bug yourself?

Did you have to change much to get it to work on WinCE (what version?) ?  I thought a number of changes would be required.  If so, 
I'd be interested in getting them into the source code.  

Ian

On 30/04/13 14:53, Cullen, Mark wrote:
Hi Everyone at Paho

I am working with a build of Paho for Windows CE using the Async APIs and I have seen some unexpected behaviour.

I create an MQTTAysnc_connectOptions structure which includes MQTTAsync_onSuccess and MQTTAsync_onFailure callbacks, and use that to make a connection.

When the connection fails because the broker does not respond MQTTAsync_onFailure is called after the timeout period with response = null which is fine. But when the connection fails because the broker returns a CONNACK message with something other than 0 MQTTAsync_onFailure is called with response pointing to some information about the CONNACK message, and is then called called again after the timeout period with response = null.

Is there a clean way to close down the connection during the first callback, I tried MQTTAsync_destroy but that causes memory access exceptions.



Thanks

Mark


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/paho-dev



Back to the top