From patchwork Mon Jun 27 12:28:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Semkowicz X-Patchwork-Id: 16378 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 9FB09BD808 for ; Mon, 27 Jun 2022 12:28:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6D58265635; Mon, 27 Jun 2022 14:28:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656332900; bh=pbGE7XDHq7hmIovBQ67Z7J+nbZQ3s/V86Bz2EQmPyvg=; 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=C6GvFwKf+gK+TSJWAOMSIcLgKsHSNeSuTnJC9FJ7ofH2MFMbww3trnHPe/37pwGI4 lUw2gaGVyztJ630A1JEdBjUiRRKtJnBZiNwec03jes1SxDc/yFdZ1acFQbWdVKvleq glIv9wC2kV4PSoAU7JhKfhUM+0/tFeY+MUNAh8Up4yjFNKcwKC2rtvNIEpv3IF5L1t D6ejD4/mpNV+YJz8rlUqS+nasBT126k+bZ9i5y87kVbhPY5MWa6aN78DQcb7Zn/ZXH 5Hbe7oHEYgTVnDfZM0CodYkqaePV2fUrHRV521iXLiffLAj0n/IxD4hkXM8NyzRZwO 0KKET6ctRIaZA== Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 426EB6563E for ; Mon, 27 Jun 2022 14:28:18 +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="0JuvJclk"; dkim-atps=neutral Received: by mail-wr1-x42a.google.com with SMTP id i1so8336394wrb.11 for ; Mon, 27 Jun 2022 05:28:18 -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=xSx4ScA8h3SC/iW39LYmFSYICgHD/QB4pZyoECSENYo=; b=0JuvJclk/C7XS8pPeYikNbu+Rn+5XmCpslmdb0YHJm2ERrZEo47ekKb6f0R5jEmz7i Zu+ACzsI9KTmssILYTf6D2vHdLVy5reeN+jF5I8ObjE29QPYlBwhHyZ0O9PYLLi5Cja+ Q4aCBaGcTlaF4f4bY47jgfXdVruD9JeqoHbHgTObYIRsnwVWGnK+oTKN4elsn4ANgnIc Umeu18NnMf8Uc7L1MywmK11bPBO5Bu4PZrouvMfb1/xMkvJa+b0vhvEWbmFXrQ5Yg3Mg vGYyy6v2ICvRpneGhN+P1veRKck8SB/YoEMMpvW92SAySyU86v7LenMUbPQScTTlsK5g pr/g== 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=xSx4ScA8h3SC/iW39LYmFSYICgHD/QB4pZyoECSENYo=; b=M1579vfkMOeGlCzXzyFIZvpg8x9g6HJ3X1S2rWynoRP6nlsIBial9waGcSd6iLDblt 62hcnihatVyiNTCRJ2AQaCRBQVAw5yq0mqbW18UIMkn2FKiUgaWQw4vQrpvDSD8hYrav 6oiMHIohIqf3bs8ZuqISG1Wl+H2xeVh/oqVIAup6FbMLcuXRFlkPPDIDQjEC9o2tkdpl kVtWCqRqGAhwK2YrggCHTiVbwQeEqx/4fvk/9OQwrGBEo9ezSli7Vr/B5jgp/fIhYLtd z7nQaeuhZOkGhqAsFg1LlGNrHZv22JE9n2KPtJL0sgZskyynHrjuu7hEhJL2yv95Hxt3 wMYQ== X-Gm-Message-State: AJIora/M12ssIGd4Cfg6xdSyyaMF/dJiYedb/enVGy90Ztj2jLIplkCW MceBZNofaesMg8Pccy2FSxyqC/jCPcwxWg== X-Google-Smtp-Source: AGRyM1uCDKbFFs12vYQf/IwsxZ6gudr++KAm69ILEVMr6U5nkYcDf0zHxuytTWe6IiJHHgtkRKGVVw== X-Received: by 2002:a05:6000:993:b0:21b:8f16:5b3f with SMTP id by19-20020a056000099300b0021b8f165b3fmr11633510wrb.628.1656332897856; Mon, 27 Jun 2022 05:28:17 -0700 (PDT) Received: from localhost.localdomain (ip092042140082.rev.nessus.at. [92.42.140.82]) by smtp.gmail.com with ESMTPSA id m18-20020a05600c4f5200b0039748be12dbsm17836401wmq.47.2022.06.27.05.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 05:28:17 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Mon, 27 Jun 2022 14:28:06 +0200 Message-Id: <20220627122806.29586-3-dse@thaumatec.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220627122806.29586-1-dse@thaumatec.com> References: <20220627122806.29586-1-dse@thaumatec.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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: Jacopo Mondi Reviewed-by: Paul Elder --- 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 6278a152..695de37b 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;