From patchwork Fri Jun 24 13:05:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Semkowicz X-Patchwork-Id: 16369 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 23CD3BE173 for ; Fri, 24 Jun 2022 13:05:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B88C86563B; Fri, 24 Jun 2022 15:05:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656075935; bh=d95mMs6hm6GgG5cjWABdkLrLZGey2LNeU7PLMnvySqA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=GetJ0fiPNwSndayOPp0Fbu0Rk1KkrWMKv+dkJMY5KqoBZ9GPxlXJwsIjsTvXio3Ok u4MQhmR/ScXSyJ6BOV/g8ELAWkRLfimHLPQ1YYgXJv+tFPEBcMqMH+6XRhgIHQDevy adsDO0AO2QkvlRw84kRgBNZONBEpRxia22QPdEp9z30N2BLYd3c1TZE5lC7j/eaMjd 18dOfgRVf2dKyRB5QsLWdg2fG8oH/SDvCPkX6VwLWNXtBkkFyBSYbV04maUYTsoPAV IPT87DXD8mF+hAR6XE3snwj5iHtqVJYfSf4ByRj25SDUw2/+b2j9pvR84L++lb1bys RZQ1j+jI4vcDA== Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 30FA365639 for ; Fri, 24 Jun 2022 15:05:34 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=thaumatec-com.20210112.gappssmtp.com header.i=@thaumatec-com.20210112.gappssmtp.com header.b="akLZDA74"; dkim-atps=neutral Received: by mail-wr1-x433.google.com with SMTP id e10so3027282wra.11 for ; Fri, 24 Jun 2022 06:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thaumatec-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jRQokZ1ijv8UYkszDObakGRM38Bj5VK5Dq47DLgN7Yc=; b=akLZDA74aoBdnjXvlx5DyLVBO3iVZKjEJCOSsNmQx9wldV/XiPNbPfA8PBlQVc2XKL QNkFASTUCQ3DTlDmSjFy9nUKyIIX5pVltOrmwDjkSVs+cwQtXuH3gPCZ/sI6Jf0TOmEZ ur0915cUxIw9poujeg+y9MPglF0N46Yfux43gNj2OJQ/j0fKPf4qgOMTUG0SWI8RWV8k 71KpA0tXyQx/rEXua8dD9Kr1B24+Df7dERghjmPP1JFVqdLdNCiinj3hUZXlylFf0s99 nfFgC8UQDA5PXbd70EO7H0Z69bKvUrK65mOoBkIORqRLKL3YHiJCH666L7H9mTProeGK MuoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jRQokZ1ijv8UYkszDObakGRM38Bj5VK5Dq47DLgN7Yc=; b=jjkZ2H1l64pImT2YD6WN0IlG79TI7RyHrk5vlm/7wY7F3i7UYBeeqcLhsQcC+jtFSN CBdjwVCqIczLY8u3e8lFy3SHGZxJBzah7aKmGFbGrCy0sYajyXu7YUO+hhhzmkyBlmIP uMK8IRxqIYiQTJjAgfY8Ic/BzWDbO1HDL6fPH6Cz1RlAdWtTV4l/5dMPIQx2+SHw50D5 uOiatkPwFxnF7P1+ZFdESM1sgXzPzWsNBGLWukYxvMZq/xD9gbU91cVa1UkkermFXT9J WznyZFFuvt0gThwBTIGWvgTN7OzfuYVZTcG0QkMI+u9N8kAFSFKVcjhTWeEq1EsnK2+a 0Tvg== X-Gm-Message-State: AJIora/tAz8H+0Gz6Oo+pmKfXTJE6CDYELYNCP/Ii8TiVFmj41CXEbvw F1kUMQTflg5U7luI7QtffvMdy/0lBoAA7gRR X-Google-Smtp-Source: AGRyM1uvH5Znq4N03NbmOehpbvXHb1ccAXJjPrGkrLjWlZtb4IK7kBSduaCcFDxUCXWADJpq1TtUHQ== X-Received: by 2002:a05:6000:1541:b0:219:c470:186c with SMTP id 1-20020a056000154100b00219c470186cmr13367321wry.34.1656075933681; Fri, 24 Jun 2022 06:05:33 -0700 (PDT) Received: from localhost.localdomain (ip092042140082.rev.nessus.at. [92.42.140.82]) by smtp.gmail.com with ESMTPSA id m20-20020a05600c4f5400b0039747cf8354sm2889703wmq.39.2022.06.24.06.05.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 06:05:33 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Fri, 24 Jun 2022 15:05:23 +0200 Message-Id: <20220624130523.41535-3-dse@thaumatec.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220624130523.41535-1-dse@thaumatec.com> References: <20220624130523.41535-1-dse@thaumatec.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/2] cam: capture_script: Check parseFrames() return value for errors 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: Daniel Semkowicz via libcamera-devel From: Daniel Semkowicz Reply-To: Daniel Semkowicz Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" parseFrames() return value was ignored. If there was an error during frame parsing, parsing was not stopped correctly. Signed-off-by: Daniel Semkowicz Reviewed-by: Laurent Pinchart --- src/cam/capture_script.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cam/capture_script.cpp b/src/cam/capture_script.cpp index 5812b122..9f7ab2af 100644 --- a/src/cam/capture_script.cpp +++ b/src/cam/capture_script.cpp @@ -150,7 +150,9 @@ int CaptureScript::parseScript(FILE *script) std::string section = eventScalarValue(event); if (section == "frames") { - parseFrames(); + ret = parseFrames(); + if (ret) + return ret; } else { std::cerr << "Unsupported section '" << section << "'" << std::endl;