summaryrefslogtreecommitdiff
path: root/src/libcamera/proxy
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-07-06 13:59:19 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-07-17 02:13:53 +0300
commit49771c6dccb28228839b5e88ada36bd6646bf933 (patch)
treeabf16156ae04ef4462d34da6a4575b999dd795ed /src/libcamera/proxy
parent2c0fad508cf64624b22cca74e623eb2a2f2c29ef (diff)
libcamera: ipa_proxy: Allow stop() on a stopped IPA
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera/proxy')
-rw-r--r--src/libcamera/proxy/ipa_proxy_thread.cpp3
1 files changed, 3 insertions, 0 deletions
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);