Commit 5fb965424fcc0aa6aca0ab7b628375de9c7287ce
1 parent
546c8348
Add parsePubAckData()
Will be used for the test client I have in mind.
Showing
3 changed files
with
13 additions
and
1 deletions
mqttpacket.cpp
| ... | ... | @@ -1211,9 +1211,15 @@ void MqttPacket::handlePublish() |
| 1211 | 1211 | } |
| 1212 | 1212 | } |
| 1213 | 1213 | |
| 1214 | +void MqttPacket::parsePubAckData() | |
| 1215 | +{ | |
| 1216 | + setPosToDataStart(); | |
| 1217 | + this->packet_id = readTwoBytesToUInt16(); | |
| 1218 | +} | |
| 1219 | + | |
| 1214 | 1220 | void MqttPacket::handlePubAck() |
| 1215 | 1221 | { |
| 1216 | - uint16_t packet_id = readTwoBytesToUInt16(); | |
| 1222 | + parsePubAckData(); | |
| 1217 | 1223 | sender->getSession()->clearQosMessage(packet_id, true); |
| 1218 | 1224 | } |
| 1219 | 1225 | ... | ... |
mqttpacket.h