Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Unable to confirm delivery without setting messageArrived callback

Hi all,

with the current version of C Paho client is not possible to confirm messages delivery without setting the messageArrived callback.

 

File src/MQTTAsync.c --> Function MQTTAsync_setCallbacks()

---------------------------------------------------------------------------

 

if (m == NULL || ma == NULL || m->c->connect_state != 0)

rc = MQTTASYNC_FAILURE;

else

{

m->context = context;

m->cl = cl;

m->ma = ma;

m->dc = dc;

}

 

 

Why is needed ma (messageArrived) callback to be set to work with dc (deliveryComplete) callback? I will just replace if condition by the following one:

 

if (m == NULL || m->c->connect_state != 0)

 

I think that subscription and publication are completely independent tasks, so I don’t know if it is a bug or something I don’t have clear enough.

 

Thank you so much,

Adrián M.


Back to the top