mirror of
https://github.com/espressif/openthread.git
synced 2026-11-04 05:23:14 +00:00
[spinel] print error on RCP reset before dying (#5784)
This commit makes ot-daemon print the RCP reset cause before exit, in case the RCP resets unexpectedly.
This commit is contained in:
@@ -770,8 +770,12 @@ void RadioSpinel<InterfaceType, ProcessContextType>::HandleValueIs(spinel_prop_k
|
||||
|
||||
if (status >= SPINEL_STATUS_RESET__BEGIN && status <= SPINEL_STATUS_RESET__END)
|
||||
{
|
||||
// If RCP crashes/resets while radio was enabled, posix app exits.
|
||||
VerifyOrDie(!IsEnabled(), OT_EXIT_RADIO_SPINEL_RESET);
|
||||
if (IsEnabled())
|
||||
{
|
||||
// If RCP crashes/resets while radio was enabled, posix app exits.
|
||||
otLogCritPlat("Unexpected RCP reset: %s", spinel_status_to_cstr(status));
|
||||
DieNow(OT_EXIT_RADIO_SPINEL_RESET);
|
||||
}
|
||||
|
||||
otLogInfoPlat("RCP reset: %s", spinel_status_to_cstr(status));
|
||||
mIsReady = true;
|
||||
|
||||
Reference in New Issue
Block a user