[mle] fix build error caused by GetParent return type change (#4437)

The GetParent return type was updated in 1996d42.
This commit is contained in:
Jiacheng Guo
2020-01-06 08:16:58 -08:00
committed by Jonathan Hui
parent 5b0af03afb
commit 90eda6ef6b
2 changed files with 9 additions and 5 deletions
@@ -136,4 +136,9 @@
#ifndef OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE
#define OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE 1
#endif
#ifndef OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE
#define OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE 1
#endif
#endif // OPENTHREAD_CORE_POSIX_CONFIG_H_
+4 -5
View File
@@ -201,10 +201,6 @@ Mle::Mle(Instance &aInstance)
// `SetMeshLocalPrefix()` also adds the Mesh-Local EID and subscribes
// to the Link- and Realm-Local All Thread Nodes multicast addresses.
#if OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE
StartParentSearchTimer();
#endif
}
otError Mle::Enable(void)
@@ -217,6 +213,9 @@ otError Mle::Enable(void)
SuccessOrExit(error = mSocket.Open(&Mle::HandleUdpReceive, this));
SuccessOrExit(error = mSocket.Bind(sockaddr));
#if OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE
StartParentSearchTimer();
#endif
exit:
return error;
}
@@ -4057,7 +4056,7 @@ void Mle::HandleParentSearchTimer(void)
VerifyOrExit(mRole == OT_DEVICE_ROLE_CHILD);
parentRss = GetParent()->GetLinkInfo().GetAverageRss();
parentRss = GetParent().GetLinkInfo().GetAverageRss();
otLogInfoMle("PeriodicParentSearch: Parent RSS %d", parentRss);
VerifyOrExit(parentRss != OT_RADIO_RSSI_INVALID);