Bug: Server Publish messages are not correctly acknowledged

This commit is contained in:
Johannes Schriewer 2018-07-31 01:14:33 +02:00
parent 7c3215efcf
commit b9c8b5c8ce

View file

@ -54,6 +54,8 @@ void subscription_set_pending(MQTTHandle *handle, char *topic, bool pending) {
void dispatch_subscription(MQTTHandle *handle, PublishPayload *payload) {
SubscriptionItem *item = handle->subscriptions.items;
// TODO: Handle server Qos
while (item != NULL) {
if ((item->pending == false) && (strcmp(payload->topic, item->topic) == 0)) {
if (item->handler) {