mesh: Correct HB sub state updates
authorIsak Westin <isak.westin@loytec.com>
Mon, 26 Sep 2022 13:01:09 +0000 (15:01 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:55 +0000 (14:55 +0530)
commit2763097e1029e240aa713364654e8712b299c42e
treeeb880fd25706afc708ab503f6863faac637678dd
parent637328d659799d96d03843bf87890520553e8d0c
mesh: Correct HB sub state updates

If heartbeat subscription is disabled, all fields should be set to zero
but collected data should be preserved. If HB subscription is enabled,
the collected data should be reset (which includes Min Hops = 0x7f).
HB subscription is disabled by setting any of the following fields to
zero: Source, destination or period log.
HB subscription is enabled by setting all the same fields to valid values.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
mesh/cfgmod-server.c
mesh/net.c