[{"id":23581,"web_url":"https://patchwork.libcamera.org/comment/23581/","msgid":"<YrXa8+O1XmVakcoI@pendragon.ideasonboard.com>","date":"2022-06-24T15:40:35","subject":"Re: [libcamera-devel] [PATCH v2 2/2] cam: capture_script: Check\n\tparseFrames() return value for errors","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Daniel,\n\nThank you for the patch.\n\nOn Fri, Jun 24, 2022 at 03:05:23PM +0200, Daniel Semkowicz via libcamera-devel wrote:\n> parseFrames() return value was ignored. If there was an error during\n> frame parsing, parsing was not stopped correctly.\n> \n> Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/cam/capture_script.cpp | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/cam/capture_script.cpp b/src/cam/capture_script.cpp\n> index 5812b122..9f7ab2af 100644\n> --- a/src/cam/capture_script.cpp\n> +++ b/src/cam/capture_script.cpp\n> @@ -150,7 +150,9 @@ int CaptureScript::parseScript(FILE *script)\n>  \t\tstd::string section = eventScalarValue(event);\n>  \n>  \t\tif (section == \"frames\") {\n> -\t\t\tparseFrames();\n> +\t\t\tret = parseFrames();\n> +\t\t\tif (ret)\n> +\t\t\t\treturn ret;\n>  \t\t} else {\n>  \t\t\tstd::cerr << \"Unsupported section '\" << section << \"'\"\n>  \t\t\t\t  << std::endl;","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 33B00BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Jun 2022 15:40:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7FB1B65632;\n\tFri, 24 Jun 2022 17:40:53 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F16026559A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Jun 2022 17:40:51 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6947547C;\n\tFri, 24 Jun 2022 17:40:51 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656085253;\n\tbh=RNPwnTMrOBbEmPZS5Y4uNL3/DBJlPxx3dlOta3UT9Is=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=e0fEfZs498oKYFHL3Gn356NGCpEjj9sjXjdaJOghncm3MDIArk0bAJKpdfkwShRko\n\trhT0fDXR+UWJ2ZV3cTD7NRe3Q+yhg7zjlLpCdlWMOmFo75vEfm2s94Z0jHFOTxg046\n\tuzWHaBV3kG9UdFYoLCPCq/wxINio6yxsH7qTSnoybhf5Y07ULkwJkNYuHXx3JT4Qko\n\tzu+5/tI+0zILJqBNi3Kz8CQPreLT0TwtqhUY/knc3/sY3fnv4kWrcpGGpdK0e3ZINR\n\tRKA1X747z2gI9COmCyQnhNVDTtQOpOfTKrkEeu1l0QPHeAkF5Hv00WbAJlO2FuE/p5\n\tu7Wla21tjDOEw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1656085251;\n\tbh=RNPwnTMrOBbEmPZS5Y4uNL3/DBJlPxx3dlOta3UT9Is=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=jMMj1PcE3qCivmanUFr+wun6jjz8BBMBVKmbdHiTNKvybVvdI8LCJr9kQe5mKeVNm\n\tm2yOLweNHUiOZ7kDjmLnYqXCGvxmWdfTJQ4Uj2+75l3rU2l77aUcdvt6Lw0NtwMYDU\n\tacz8eBxvjfS/EBHhRXpYwm44KQs3BQBeQuk+r96w="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"jMMj1PcE\"; dkim-atps=neutral","Date":"Fri, 24 Jun 2022 18:40:35 +0300","To":"Daniel Semkowicz <dse@thaumatec.com>","Message-ID":"<YrXa8+O1XmVakcoI@pendragon.ideasonboard.com>","References":"<20220624130523.41535-1-dse@thaumatec.com>\n\t<20220624130523.41535-3-dse@thaumatec.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220624130523.41535-3-dse@thaumatec.com>","Subject":"Re: [libcamera-devel] [PATCH v2 2/2] cam: capture_script: Check\n\tparseFrames() return value for errors","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]