mirror of
https://github.com/espressif/openthread.git
synced 2026-08-09 04:07:47 +00:00
[mesh-forwarder] change Start() and Stop() to be void (no error return) (#3509)
This commit is contained in:
committed by
Jonathan Hui
parent
249bc59874
commit
f13e35d5f7
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user