mirror of
https://github.com/espressif/openthread.git
synced 2026-08-19 17:09:51 +00:00
Do not call otPlatRadioEnableSrcMatch in constructor. (#1008)
This commit is contained in:
@@ -80,9 +80,7 @@ MeshForwarder::MeshForwarder(ThreadNetif &aThreadNetif):
|
||||
mMeshSource = Mac::kShortAddrInvalid;
|
||||
mMeshDest = Mac::kShortAddrInvalid;
|
||||
mAddMeshHeader = false;
|
||||
|
||||
mMac.EnableSrcMatch(true);
|
||||
mSrcMatchEnabled = true;
|
||||
mSrcMatchEnabled = false;
|
||||
|
||||
mMac.RegisterReceiver(mMacReceiver);
|
||||
}
|
||||
@@ -320,6 +318,12 @@ ThreadError MeshForwarder::AddSrcMatchEntry(Child &aChild)
|
||||
{
|
||||
// succeed in adding to source match table
|
||||
aChild.mAddSrcMatchEntryPending = false;
|
||||
|
||||
if (!mSrcMatchEnabled)
|
||||
{
|
||||
mMac.EnableSrcMatch(true);
|
||||
mSrcMatchEnabled = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user