[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:
Moandor
2020-05-15 10:01:45 -07:00
committed by GitHub
parent 7a3b52ed87
commit 3d870fc312
+1 -1
View File
@@ -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();
}