mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-11-10 22:40:33 +00:00
mesh: set delayed timer for periodic publish before publishing
Encrypting and sending a message takes a considerable amount of time which makes the publication period longer than expected. With this patch it is possible to pass MESH/SR/HM/CFS/BV-02-C test. X-Original-Commit: bd394afb2112eb32b3e436bbc9e25cedcfd3649a
This commit is contained in:
@@ -98,15 +98,15 @@ static void mod_publish(struct os_event *work)
|
||||
|
||||
BT_DBG("");
|
||||
|
||||
if (pub->func) {
|
||||
pub->func(pub->mod);
|
||||
}
|
||||
|
||||
period_ms = bt_mesh_model_pub_period_get(pub->mod);
|
||||
BT_DBG("period %u ms", period_ms);
|
||||
if (period_ms) {
|
||||
k_delayed_work_submit(&pub->timer, period_ms);
|
||||
}
|
||||
|
||||
if (pub->func) {
|
||||
pub->func(pub->mod);
|
||||
}
|
||||
}
|
||||
|
||||
static void mod_init(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
|
||||
|
||||
Reference in New Issue
Block a user