mesh: Fix regression error in HB subscription set
authorInga Stotland <inga.stotland@intel.com>
Wed, 18 Nov 2020 19:56:00 +0000 (11:56 -0800)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Mon, 28 Dec 2020 06:20:04 +0000 (11:50 +0530)
commit0d09f6189ae35b93ff3879210cc5ecdd9eda0808
tree657d7910f95d045f185d2559702f28d434fb5f53
parent6fc0911de261fe907ca02f83776964a6c9a88dd7
mesh: Fix regression error in HB subscription set

This fixes a regression introduced in commit c77bb848a9fb
("mesh: Refactor heartbeat pub/sub"):
Heartbeat subscription should be enabled unless either source or
destination are unassigned addresses or period log is zero.

Also, decrement ref count on group destination address if period log
is zero since the subscription is not supposed to be processed.

Change-Id: I981784d5e260e90dce022ee8785d3d1b47348e57
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
mesh/net.c