Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fw: change golioth_fw_report_state() API to be synchronous
This API does not take any callback, which means that it is not possible to handle any communication errors or error responses from server. The main reason why its implementation used golioth_coap_req_cb() (in [1]) was to reduce breaking changes by allowing users to call this API from system_client thread (which is not possible for synchronous APIs). As right now samples/dfu/ has been updated to report FW state (i.e. call golioth_fw_report_state() API) from main application thread, there is little reason to keep golioth_fw_report_state() asynchronous. If asynchronous API will be required in future, then such API would need to take callback argument similar to other services (like LightDB and LightDB Stream). Such API is not introduced now, as that would either require second DFU sample with a slightly different flow or alternatively unit tests for this new callback-based API. [1] commit a540099 ("fw: rework on top of 'coap_req'") Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
- Loading branch information