820cfc52ad
Periodic publication would previously build and send the first publication inside the bt_mesh_model_pub() function, before cancelling and rescheduling the next publication. The timer handler would only handle retransmissions, and would abandon the rest of the publication event if one of the packets failed to send. This design has three issues: - If the initial timer cancel fails, the publication would interfer with the periodic publication management, which might skip an event or send too many packets. - If any of the messages fail to publish, the full publication event would be abandoned. This is not predictable or expected from the API. - bt_mesh_model_pub() required 384 bytes of stack to build the message, which has to be factored into all calling threads. This patch moves all transmission into the publication timer by replacing k_work_cancel with a single k_work_reschedule(K_NO_WAIT). It also changes the error recovery behavior to attempt to finish the full publication event even if some of the transmissions fail. Split out from #33782. Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no> |
||
---|---|---|
.. | ||
access.h | ||
cdb.h | ||
cfg.h | ||
cfg_cli.h | ||
cfg_srv.h | ||
health_cli.h | ||
health_faults.h | ||
health_srv.h | ||
heartbeat.h | ||
main.h | ||
msg.h | ||
proxy.h |