diff options
author | Isak Westin <isak.westin@loytec.com> | 2022-09-26 15:01:09 +0200 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2022-09-26 13:14:47 -0700 |
commit | 902389f3e7a33e5730d7e2318b1f1868170dc092 (patch) | |
tree | a3b4a55a10c46af545919572aadcd08980c0f7e4 /mesh/cfgmod-server.c | |
parent | 1ef221ca020581575a3775ec60c0a28e384081be (diff) | |
download | bluez-902389f3e7a33e5730d7e2318b1f1868170dc092.tar.gz |
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.
Diffstat (limited to 'mesh/cfgmod-server.c')
-rw-r--r-- | mesh/cfgmod-server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c index 9c5edf551..55a2d896b 100644 --- a/mesh/cfgmod-server.c +++ b/mesh/cfgmod-server.c @@ -496,7 +496,7 @@ static uint16_t hb_subscription_get(struct mesh_node *node, int status) n += 2; msg[n++] = uint32_to_log(time_now.tv_sec); msg[n++] = sub->count != 0xffff ? uint32_to_log(sub->count) : 0xff; - msg[n++] = sub->count ? sub->min_hops : 0; + msg[n++] = sub->min_hops; msg[n++] = sub->max_hops; return n; |