This is an automated email from the ASF dual-hosted git repository. naraj pushed a commit to branch revert-958-mesh_sync_march21 in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit c7bff371cd9054efccc65543cd9bbac8b18d04b4 Author: MichaĆ Narajowski <[email protected]> AuthorDate: Thu May 27 10:20:19 2021 +0200 Revert "mesh: Fix heartbeat subscription tests" This reverts commit 8becf2a64f0659d431685e5f39f8fbfa2aa2404b. --- nimble/host/mesh/src/cfg_srv.c | 10 +--------- nimble/host/mesh/src/heartbeat.c | 5 ----- nimble/host/mesh/src/heartbeat.h | 1 - 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/nimble/host/mesh/src/cfg_srv.c b/nimble/host/mesh/src/cfg_srv.c index 404f731..8a085bd 100644 --- a/nimble/host/mesh/src/cfg_srv.c +++ b/nimble/host/mesh/src/cfg_srv.c @@ -2387,19 +2387,11 @@ static void heartbeat_sub_set(struct bt_mesh_model *model, /* MESH/NODE/CFG/HBS/BV-01-C expects the MinHops to be 0x7f after * disabling subscription, but 0x00 for subsequent Get requests. */ - if (sub.src == BT_MESH_ADDR_UNASSIGNED || !period_log) { + if (!period_log) { sub.min_hops = BT_MESH_TTL_MAX; } hb_sub_send_status(model, ctx, &sub); - - /* MESH/NODE/CFG/HBS/BV-02-C expects us to return previous - * count value and then reset it to 0. - */ - if (sub.src != BT_MESH_ADDR_UNASSIGNED && - sub.dst != BT_MESH_ADDR_UNASSIGNED && !period) { - bt_mesh_hb_sub_reset_count(); - } } const struct bt_mesh_model_op bt_mesh_cfg_srv_op[] = { diff --git a/nimble/host/mesh/src/heartbeat.c b/nimble/host/mesh/src/heartbeat.c index f990dc0..538a1cb 100644 --- a/nimble/host/mesh/src/heartbeat.c +++ b/nimble/host/mesh/src/heartbeat.c @@ -303,11 +303,6 @@ uint8_t bt_mesh_hb_sub_set(uint16_t src, uint16_t dst, uint32_t period) return STATUS_SUCCESS; } -void bt_mesh_hb_sub_reset_count(void) -{ - sub.count = 0; -} - void bt_mesh_hb_sub_get(struct bt_mesh_hb_sub *get) { *get = sub; diff --git a/nimble/host/mesh/src/heartbeat.h b/nimble/host/mesh/src/heartbeat.h index 92b0cae..c43683f 100644 --- a/nimble/host/mesh/src/heartbeat.h +++ b/nimble/host/mesh/src/heartbeat.h @@ -38,4 +38,3 @@ void bt_mesh_hb_feature_changed(uint16_t features); uint8_t bt_mesh_hb_pub_set(struct bt_mesh_hb_pub *hb_pub); uint8_t bt_mesh_hb_sub_set(uint16_t src, uint16_t dst, uint32_t period); -void bt_mesh_hb_sub_reset_count(void);
