summaryrefslogtreecommitdiff
path: root/utils/ipc/generators/libcamera_templates
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2023-12-11 19:56:38 +0900
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-01-09 15:39:04 +0000
commit1d0d2cf67cb7100cfc7a368347271f88365b0a52 (patch)
treefb0900ae7b74a837ec26ca906b224b6e7201e0bb /utils/ipc/generators/libcamera_templates
parent0857348887175651308950cd6fd6217c997335a1 (diff)
utils: ipc: Fix deserialization of multiple fd parameters
The IPADataSerializer::deserializer attempts to optimise code paths and remove potentially unused code where multiple File Descriptors were not expected to be utilised. The addition of multiple SharedFD entries in the IPC highlights this as a bug. Clean up the conditionals to ensure that all File Descriptors are correctly deserialized. Bug: https://bugs.libcamera.org/show_bug.cgi?id=205 Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Tested-by: Andrey Konovalov <andrey.konovalov@linaro.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'utils/ipc/generators/libcamera_templates')
-rw-r--r--utils/ipc/generators/libcamera_templates/proxy_functions.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl
index 2be65d43..b5797b14 100644
--- a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl
+++ b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl
@@ -186,7 +186,7 @@ IPADataSerializer<{{param|name}}>::deserialize(
{% for param in params|with_fds %}
{%- if loop.first %}
const size_t {{param.mojom_name}}FdStart = 0;
-{%- elif not loop.last %}
+{%- else %}
const size_t {{param.mojom_name}}FdStart = {{loop.previtem.mojom_name}}FdStart + {{loop.previtem.mojom_name}}FdsSize;
{%- endif %}
{%- endfor %}