This repository was archived by the owner on Nov 11, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to cellular MQTT client: capture truncated messages correctly. (#…
…1093) The cellular code to read MQTT messages from the MQTT client in a module is intended to return U_ERROR_COMMON_TRUNCATED if an insufficiently large buffer has been provided by the application to read the message. However, it didn't do this correctly: as indicated in the description of the uAtClientReadBytes() function, the last parameter, "standalone", must be set to true if stop tags are being ignored (which they are in this case since the binary message might contain the stop tag string), otherwise the uAtClientReadBytes() function will search forever for a non-existent stop-tag, leading to an error condition in the uAtClient code, and this error will be reported instead of U_ERROR_COMMON_TRUNCATED. Our thanks to AntonZyma for spotting this.
- Loading branch information