From 09981263bc4458c6f1f3cdb1b6188ef355bc2737 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 19 Apr 2017 00:09:24 +0200 Subject: [PATCH] LimeSDR input: suspend thread for configuration only if in running state --- plugins/samplesource/limesdrinput/limesdrinput.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/samplesource/limesdrinput/limesdrinput.cpp b/plugins/samplesource/limesdrinput/limesdrinput.cpp index 7646525ba..e0868a558 100644 --- a/plugins/samplesource/limesdrinput/limesdrinput.cpp +++ b/plugins/samplesource/limesdrinput/limesdrinput.cpp @@ -342,7 +342,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc if (m_deviceShared.m_deviceParams->getDevice() != 0) { - if (m_limeSDRInputThread && !threadStopped) + if (m_limeSDRInputThread && m_running && !threadStopped) { m_limeSDRInputThread->stopWork(); threadStopped = true; @@ -374,7 +374,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc if (m_deviceShared.m_deviceParams->getDevice() != 0) { - if (m_limeSDRInputThread && !threadStopped) + if (m_limeSDRInputThread && m_running && !threadStopped) { m_limeSDRInputThread->stopWork(); threadStopped = true; @@ -407,7 +407,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc if (m_deviceShared.m_deviceParams->getDevice() != 0) { - if (m_limeSDRInputThread && !threadStopped) + if (m_limeSDRInputThread && m_running && !threadStopped) { m_limeSDRInputThread->stopWork(); threadStopped = true; @@ -436,7 +436,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc if (m_deviceShared.m_deviceParams->getDevice() != 0) { - if (m_limeSDRInputThread && !threadStopped) + if (m_limeSDRInputThread && m_running && !threadStopped) { m_limeSDRInputThread->stopWork(); threadStopped = true; @@ -481,7 +481,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc if (m_deviceShared.m_deviceParams->getDevice() != 0) { - if (m_limeSDRInputThread && !threadStopped) + if (m_limeSDRInputThread && m_running && !threadStopped) { m_limeSDRInputThread->stopWork(); threadStopped = true;