From patchwork Mon Dec 11 10:56:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 19303 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id BD0F3BD78E for ; Mon, 11 Dec 2023 10:56:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EE90962B32; Mon, 11 Dec 2023 11:56:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1702292216; bh=WBo/sNhd+lvgqzO2S5e5PKoSHjIlO1rJf09oStXQDfI=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=VFLfCZRGDvnKTp0Wprh/JCZILsJZpJrF3UafpMuhSmHuO/isdIW1nqF572b5v+8oq QAMxT+v9ua+GL/H5R03SRYhFK3ljlUlWTyhaD8sGq8A7LYlXMfQIRh6CM/nWbNhxk2 dpMlNYm8qD0SN2BXAqXngRcP0km97lWmBy8yMC4/r9jTCBHHSdXgaBXzPayukXPvNG c0J+mUsKDsswKsL5JrLnjakB/7R/uCXLA48BX/2Z6vcCjcZbSD2vpayuV8u6NQ7WIV 4DdzI8vGMvLGW9xXBUG5kwygNLerjHx4Q/BnYrbzzcTFTaKLKa51AbQwjC+l4MG6Wy MbbmNp50dCnVw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C767629DF for ; Mon, 11 Dec 2023 11:56:53 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="QE+d6SKE"; dkim-atps=neutral Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 83AC9922; Mon, 11 Dec 2023 11:56:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1702292169; bh=WBo/sNhd+lvgqzO2S5e5PKoSHjIlO1rJf09oStXQDfI=; h=From:To:Cc:Subject:Date:From; b=QE+d6SKEEI9T+/VddYeUXeqfq/hGmhrBgtTQ3Ej03kf4MpRR0S3wDJ6fkDr267HOx tbYAcT0poRzJnzX9sF7gVcFmFCfgFYLYUCw7L42n+YaIUoTM/a4U9T5prM9kABs64n D8NZh6OB0oiK6Z69W61VBafNlaFWJd00JjtF5Y/Q= To: libcamera-devel@lists.libcamera.org Date: Mon, 11 Dec 2023 19:56:38 +0900 Message-Id: <20231211105638.1787362-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] utils: ipc: Fix deserialization of multiple fd parameters X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Paul Elder via libcamera-devel From: Paul Elder Reply-To: Paul Elder Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Tested-by: Andrey Konovalov Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- 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 %}