mirror of
https://github.com/espressif/openthread.git
synced 2026-08-15 23:27:47 +00:00
[channel-monitor] remove channel monitor copying (#4970)
This removes the copying of `ChannelMonitor` in `otChannelMonitorSetEnabled`, so channel monitor enable/disable can work.
This commit is contained in:
@@ -43,7 +43,7 @@ using namespace ot;
|
||||
|
||||
otError otChannelMonitorSetEnabled(otInstance *aInstance, bool aEnabled)
|
||||
{
|
||||
Utils::ChannelMonitor monitor = static_cast<Instance *>(aInstance)->Get<Utils::ChannelMonitor>();
|
||||
Utils::ChannelMonitor &monitor = static_cast<Instance *>(aInstance)->Get<Utils::ChannelMonitor>();
|
||||
|
||||
return aEnabled ? monitor.Start() : monitor.Stop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user