Fix adding elements to WaitREGACKPacketList

Signed-off-by: Mariusz Suchora <mariusz.suchora@tieto.com>
This commit is contained in:
Mariusz Suchora
2018-02-23 10:20:32 +01:00
parent 594db623ee
commit 1ef38fb7a0

View File

@@ -1155,8 +1155,12 @@ int WaitREGACKPacketList::setPacket(MQTTSNPacket* packet, uint16_t REGACKMsgId)
_first = elm;
_end = elm;
}
elm->_prev = _end;
else
{
_end->_next = elm;
elm->_prev = _end;
_end = elm;
}
return 1;
}