Skip to content

Commit

Permalink
Merge branch 'master' of https://gitee.com/openLuat/LuatOS
Browse files Browse the repository at this point in the history
  • Loading branch information
allewalker committed Jan 24, 2024
2 parents e1b16ef + 6fb9096 commit e4f3c73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/network/libemqtt/luat_mqtt_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ static int luat_mqtt_msg_cb(luat_mqtt_ctrl_t *mqtt_ctrl) {
}
case MQTT_MSG_PUBLISH : {
LLOGD("MQTT_MSG_PUBLISH");
qos = MQTTParseMessageQos(mqtt_ctrl->mqtt_packet_buffer);
#ifdef __LUATOS__
const uint8_t* ptr;
qos = MQTTParseMessageQos(mqtt_ctrl->mqtt_packet_buffer);
uint16_t topic_len = mqtt_parse_pub_topic_ptr(mqtt_ctrl->mqtt_packet_buffer, &ptr);
uint16_t payload_len = mqtt_parse_pub_msg_ptr(mqtt_ctrl->mqtt_packet_buffer, &ptr);
luat_mqtt_msg_t *mqtt_msg = (luat_mqtt_msg_t *)luat_heap_malloc(sizeof(luat_mqtt_msg_t)+topic_len+payload_len);
Expand Down

0 comments on commit e4f3c73

Please sign in to comment.