[PATCH] utils: ipc: Fix async main interface functions with no parameters

Paul Elder paul.elder at ideasonboard.com
Fri Apr 12 04:42:56 CEST 2024


If an async main interface function is defined with no parameters, there
would be a compilation error complaining about an extra comma. Fix this.

Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
 .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
index 238cf4a5..01fe9c51 100644
--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
@@ -175,7 +175,8 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)
 );
 {% elif method|is_async %}
 	ASSERT(state_ == ProxyRunning);
-	proxy_.invokeMethod(&ThreadProxy::{{method.mojom_name}}, ConnectionTypeQueued,
+	proxy_.invokeMethod(&ThreadProxy::{{method.mojom_name}}, ConnectionTypeQueued
+	{%- if method|method_param_names|length > 0 -%}, {% endif -%}
 	{%- for param in method|method_param_names -%}
 		{{param}}{{- ", " if not loop.last}}
 	{%- endfor -%}
-- 
2.39.2



More information about the libcamera-devel mailing list