You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by na...@apache.org on 2021/05/27 08:20:47 UTC

[mynewt-nimble] 20/31: Revert "mesh: Check subnet existence in heartbeat_send"

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 985d8af41e1591e208cf55ad28da9e72e11e3cc6
Author: MichaƂ Narajowski <mi...@codecoup.pl>
AuthorDate: Thu May 27 10:20:19 2021 +0200

    Revert "mesh: Check subnet existence in heartbeat_send"
    
    This reverts commit fa8ca30b87fce7af909d464cef9b9b3383626ea2.
---
 nimble/host/mesh/src/heartbeat.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/nimble/host/mesh/src/heartbeat.c b/nimble/host/mesh/src/heartbeat.c
index 3ba7ae3..f990dc0 100644
--- a/nimble/host/mesh/src/heartbeat.c
+++ b/nimble/host/mesh/src/heartbeat.c
@@ -87,10 +87,8 @@ static int heartbeat_send(const struct bt_mesh_send_cb *cb, void *cb_data)
 		.xmit = bt_mesh_net_transmit_get(),
 	};
 
-	/* Do nothing if heartbeat publication is not enabled or the subnet is
-	 * removed.
-	 */
-	if (!tx.sub || pub.dst == BT_MESH_ADDR_UNASSIGNED) {
+	/* Do nothing if heartbeat publication is not enabled */
+	if (pub.dst == BT_MESH_ADDR_UNASSIGNED) {
 		return 0U;
 	}