mirror of
https://github.com/espressif/openthread.git
synced 2026-08-19 08:59:52 +00:00
[ncp] initialize diag output callback per instance in NcpBase (#10547)
This fixes a bug where diag get output callback was not set properly if we used instance with iid > 1, leading to failure output.
This commit is contained in:
@@ -258,6 +258,9 @@ NcpBase::NcpBase(Instance **aInstances, uint8_t aCount)
|
||||
|
||||
OT_ASSERT(i + skipped <= SPINEL_HEADER_IID_MAX);
|
||||
mInstances[i + skipped] = aInstances[i];
|
||||
#if OPENTHREAD_CONFIG_DIAG_ENABLE
|
||||
otDiagSetOutputCallback(mInstances[i + skipped], &NcpBase::HandleDiagOutput_Jump, this);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif // OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE && OPENTHREAD_RADIO
|
||||
|
||||
Reference in New Issue
Block a user