[libcamera-devel] [PATCH] utils: ipc: Fix deserialization of multiple fd parameters
Andrey Konovalov
andrey.konovalov at linaro.org
Tue Dec 19 22:13:43 CET 2023
Hi Paul,
On 11.12.2023 13:56, Paul Elder wrote:
> There was a bug where the code generated for deserialization of function
> parameters would fail if there were multiple file descriptor parameters.
> Fix this.
>
> Bug: https://bugs.libcamera.org/show_bug.cgi?id=205
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
Tested-by: Andrey Konovalov <andrey.konovalov at linaro.org>
> ---
> utils/ipc/generators/libcamera_templates/proxy_functions.tmpl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl
> index 2be65d432..b5797b149 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 %}
More information about the libcamera-devel
mailing list