[spi-hdlc-adapter] reset NCP/RCP on exit (#3801)

This commit triggers resetting NCP/RCP on exit, which ensures NCP/RCP
get back to uninitialized state so that they will not respond to 15.4
messages.

Note, host should disable soft reset by passing `--no-reset` for RCP.
Thus OpenThread POSIX app doesn't need to reset RCP when it exits.
This commit is contained in:
Yakun Xu
2019-05-09 21:28:20 -07:00
committed by Jonathan Hui
parent 246c5eaf33
commit 333d5f7afb
@@ -1983,6 +1983,9 @@ int main(int argc, char *argv[])
bail:
syslog(LOG_NOTICE, "Shutdown. (sRet = %d)", sRet);
syslog(LOG_NOTICE, "Reset NCP/RCP");
trigger_reset();
if (sRet == EXIT_QUIT)
{
sRet = EXIT_SUCCESS;