Skip to content

Commit

Permalink
* FIX [mqtt_codec] Fix the wrong counter of reason codes of unsuback …
Browse files Browse the repository at this point in the history
…when decode.
  • Loading branch information
wanghaEMQ authored and JaylinYu committed Jun 29, 2023
1 parent c6e9a1f commit d39b98a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/supplemental/mqtt/mqtt_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2677,6 +2677,7 @@ nni_mqttv5_msg_decode_unsuback(nni_msg *msg)
decode_buf_properties(body, length, &pos, &prop_len, true);
buf.curpos = &body[0] + pos;

mqtt->payload.unsuback.ret_code_count = length - pos;
mqtt->payload.unsuback.ret_code_arr =
(uint8_t *) nni_alloc(mqtt->payload.unsuback.ret_code_count);
uint8_t *ptr = mqtt->payload.unsuback.ret_code_arr;
Expand Down

0 comments on commit d39b98a

Please sign in to comment.