shell: mqtt: use `ring_buf_reset` to flush `rx_rb`
The `sh_mqtt_rx_rb_flush` function was intended to flush `rx_rb` when
get an error return from `mqtt_read_publish_payload_blocking`.
Instead of retrieving values from `rx_rb` one by one, calling
`ring_buf_reset` achieves the same result more efficiently.
Signed-off-by:
Pisit Sawangvonganan <pisit@ndrsolution.com>
Loading
Please sign in to comment