mirror of
https://github.com/espressif/openthread.git
synced 2026-08-06 02:37:47 +00:00
[ncp] keep timeout zero during ramp-down in spinel ADDRESS_CACHE_TABLE (#9247)
This commit updates the NCP code to set the timeout field in spinel `SPINEL_PROP_THREAD_ADDRESS_CACHE_TABLE` as zero when in ramp-down mode. This ensures that the behavior of the NCP remains unchanged and that test cases like `ncp/test-039-address-cache-table-snoop.py`, which expect the timeout to reach zero, to pass.
This commit is contained in:
@@ -1210,7 +1210,7 @@ template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_THREAD_ADDRESS_CACHE_
|
||||
if (entry.mState != OT_CACHE_ENTRY_STATE_CACHED)
|
||||
{
|
||||
SuccessOrExit(error = mEncoder.WriteBool(entry.mCanEvict));
|
||||
SuccessOrExit(error = mEncoder.WriteUint16(entry.mTimeout));
|
||||
SuccessOrExit(error = mEncoder.WriteUint16(entry.mRampDown ? 0 : entry.mTimeout));
|
||||
SuccessOrExit(error = mEncoder.WriteUint16(entry.mRetryDelay));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user