From f92996b0257b04ed42976e251e2adf42cebd4cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kopy=C5=9Bci=C5=84ski?= Date: Tue, 15 Dec 2020 11:43:11 +0100 Subject: [PATCH] mesh: Only block mod_sub if status was requested Adds a cli_reset to mod_sub if no status response was requested. This adds a non-blocking mode to the mod_sub calls, matching the behavior of other cfg_cli functions. This is port of b0f83d387ab469f5ae6ba2269e6b85b3af7101a6 --- nimble/host/mesh/src/cfg_cli.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nimble/host/mesh/src/cfg_cli.c b/nimble/host/mesh/src/cfg_cli.c index 5e8f53c1c..a87cd7bb9 100644 --- a/nimble/host/mesh/src/cfg_cli.c +++ b/nimble/host/mesh/src/cfg_cli.c @@ -1573,6 +1573,12 @@ static int mod_sub(uint32_t op, uint16_t net_idx, uint16_t addr, uint16_t elem_a goto done; } + if (!status) { + cli_reset(); + err = 0; + goto done; + } + err = cli_wait(); done: os_mbuf_free_chain(msg);