From 49771c6dccb28228839b5e88ada36bd6646bf933 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 6 Jul 2020 13:59:19 +0300 Subject: libcamera: ipa_proxy: Allow stop() on a stopped IPA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To make error handling easier in callers, allow the stop() function to be called when the proxy is already stopped, or not started yet. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/proxy/ipa_proxy_thread.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libcamera/proxy') diff --git a/src/libcamera/proxy/ipa_proxy_thread.cpp b/src/libcamera/proxy/ipa_proxy_thread.cpp index aa403e22..eead2883 100644 --- a/src/libcamera/proxy/ipa_proxy_thread.cpp +++ b/src/libcamera/proxy/ipa_proxy_thread.cpp @@ -121,6 +121,9 @@ int IPAProxyThread::start() void IPAProxyThread::stop() { + if (!running_) + return; + running_ = false; proxy_.invokeMethod(&ThreadProxy::stop, ConnectionTypeBlocking); -- cgit v1.2.1