mirror of
https://github.com/jeelabs/esp-link.git
synced 2026-02-20 02:31:19 +01:00
Changed argument getter with sizeof
This commit is contained in:
committed by
Thorsten von Eicken
parent
3036a1f4cc
commit
697e6b5c22
@@ -93,10 +93,10 @@ MQTTCMD_Lwt(CmdPacket *cmd) {
|
||||
client->connect_info.will_message[len] = 0;
|
||||
|
||||
// get qos
|
||||
cmdPopArg(&req, (uint8_t*)&client->connect_info.will_qos, 4);
|
||||
cmdPopArg(&req, (uint8_t*)&client->connect_info.will_qos, sizeof(client->connect_info.will_qos));
|
||||
|
||||
// get retain
|
||||
cmdPopArg(&req, (uint8_t*)&client->connect_info.will_retain, 4);
|
||||
cmdPopArg(&req, (uint8_t*)&client->connect_info.will_retain, sizeof(client->connect_info.will_retain));
|
||||
|
||||
DBG("MQTT: MQTTCMD_Lwt topic=%s, message=%s, qos=%d, retain=%d\n",
|
||||
client->connect_info.will_topic,
|
||||
@@ -177,7 +177,7 @@ MQTTCMD_Subscribe(CmdPacket *cmd) {
|
||||
|
||||
// get qos
|
||||
uint32_t qos = 0;
|
||||
cmdPopArg(&req, (uint8_t*)&qos, 4);
|
||||
cmdPopArg(&req, (uint8_t*)&qos, sizeof(qos));
|
||||
|
||||
DBG("MQTT: MQTTCMD_Subscribe topic=%s, qos=%u\n", topic, qos);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user