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
This commit is contained in:
Krzysztof Kopyściński
2021-01-12 14:05:19 +01:00
committed by Łukasz Rymanowski
parent 935509a42a
commit f92996b025
+6
View File
@@ -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);