mirror of https://github.com/eclipse/paho.mqtt.c
Fix up suback count check
This commit is contained in:
parent
09ffa867e4
commit
951a263dcd
|
|
@ -2080,17 +2080,19 @@ MQTTResponse MQTTClient_subscribeMany5(MQTTClient handle, int count, char* const
|
|||
}
|
||||
else
|
||||
{
|
||||
if (count < sub->qoss->count)
|
||||
{
|
||||
ListElement *current = NULL;
|
||||
|
||||
/* if the returned count is greater than requested, it's an error*/
|
||||
if (sub->qoss->count > count)
|
||||
rc = MQTTCLIENT_FAILURE;
|
||||
goto exit;
|
||||
}
|
||||
ListElement* current = NULL;
|
||||
i = 0;
|
||||
while (ListNextElement(sub->qoss, ¤t))
|
||||
else
|
||||
{
|
||||
int* reqqos = (int*)(current->content);
|
||||
qos[i++] = *reqqos;
|
||||
i = 0;
|
||||
while (ListNextElement(sub->qoss, ¤t))
|
||||
{
|
||||
int *reqqos = (int*) (current->content);
|
||||
qos[i++] = *reqqos;
|
||||
}
|
||||
}
|
||||
resp.reasonCode = rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue