From 3d870fc3124e0d764e3b1b01d96653907b71ec15 Mon Sep 17 00:00:00 2001 From: Moandor Date: Sat, 16 May 2020 01:01:45 +0800 Subject: [PATCH] [channel-monitor] remove channel monitor copying (#4970) This removes the copying of `ChannelMonitor` in `otChannelMonitorSetEnabled`, so channel monitor enable/disable can work. --- src/core/api/channel_monitor_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/api/channel_monitor_api.cpp b/src/core/api/channel_monitor_api.cpp index 19ccfe7d1..bb1970edd 100644 --- a/src/core/api/channel_monitor_api.cpp +++ b/src/core/api/channel_monitor_api.cpp @@ -43,7 +43,7 @@ using namespace ot; otError otChannelMonitorSetEnabled(otInstance *aInstance, bool aEnabled) { - Utils::ChannelMonitor monitor = static_cast(aInstance)->Get(); + Utils::ChannelMonitor &monitor = static_cast(aInstance)->Get(); return aEnabled ? monitor.Start() : monitor.Stop(); }