[mesh-forwarder] change Start() and Stop() to be void (no error return) (#3509)

This commit is contained in:
Abtin Keshavarzian
2019-01-25 08:36:30 -08:00
committed by Jonathan Hui
parent 249bc59874
commit f13e35d5f7
2 changed files with 5 additions and 14 deletions
+3 -8
View File
@@ -97,23 +97,18 @@ MeshForwarder::MeshForwarder(Instance &aInstance)
#endif
}
otError MeshForwarder::Start(void)
void MeshForwarder::Start(void)
{
otError error = OT_ERROR_NONE;
if (mEnabled == false)
{
GetNetif().GetMac().SetRxOnWhenIdle(true);
mEnabled = true;
}
return error;
}
otError MeshForwarder::Stop(void)
void MeshForwarder::Stop(void)
{
ThreadNetif &netif = GetNetif();
otError error = OT_ERROR_NONE;
Message * message;
VerifyOrExit(mEnabled == true);
@@ -147,7 +142,7 @@ otError MeshForwarder::Stop(void)
netif.GetMac().SetRxOnWhenIdle(false);
exit:
return error;
return;
}
void MeshForwarder::RemoveMessage(Message &aMessage)
+2 -6
View File
@@ -181,18 +181,14 @@ public:
/**
* This method enables mesh forwarding and the IEEE 802.15.4 MAC layer.
*
* @retval OT_ERROR_NONE Successfully enabled the mesh forwarder.
*
*/
otError Start(void);
void Start(void);
/**
* This method disables mesh forwarding and the IEEE 802.15.4 MAC layer.
*
* @retval OT_ERROR_NONE Successfully disabled the mesh forwarder.
*
*/
otError Stop(void);
void Stop(void);
/**
* This method submits a message to the mesh forwarder for forwarding.