mirror of
https://github.com/espressif/openthread.git
synced 2026-07-31 08:07:47 +00:00
[spinel] only request crash logs on RCP recovery if capable (#10213)
During RCP recovery, the Host does not check if the RCP supports logging a crash dump. This causes RCP recovery to fail when the RCP is built with `OPENTHREAD_CONFIG_PLATFORM_LOG_CRASH_DUMP_ENABLE = 0`. This bug was introduced in #10061 This commit will make the Host only request crash logs from the RCP if the RCP supports it.
This commit is contained in:
@@ -2002,7 +2002,11 @@ void RadioSpinel::RecoverFromRcpFailure(void)
|
||||
|
||||
--mRcpFailureCount;
|
||||
|
||||
SuccessOrDie(Set(SPINEL_PROP_RCP_LOG_CRASH_DUMP, nullptr));
|
||||
if (sSupportsLogCrashDump)
|
||||
{
|
||||
LogDebg("RCP supports crash dump logging. Requesting crash dump.");
|
||||
SuccessOrDie(Set(SPINEL_PROP_RCP_LOG_CRASH_DUMP, nullptr));
|
||||
}
|
||||
|
||||
LogNote("RCP recovery is done");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user