Show a patch.

GET /api/patches/22065/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 22065,
    "url": "https://patchwork.libcamera.org/api/patches/22065/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22065/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20241125000834.396815-1-pobrn@protonmail.com>",
    "date": "2024-11-25T00:08:37",
    "name": "[v1] libcamera: camera: Fix clearing of stream associations before `validate()`",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "d3c18ba89ef9611e9d61ff89eecdc78f27a999d3",
    "submitter": {
        "id": 133,
        "url": "https://patchwork.libcamera.org/api/people/133/?format=api",
        "name": "Pőcze Barnabás",
        "email": "pobrn@protonmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22065/mbox/",
    "series": [
        {
            "id": 4816,
            "url": "https://patchwork.libcamera.org/api/series/4816/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4816",
            "date": "2024-11-25T00:08:37",
            "name": "[v1] libcamera: camera: Fix clearing of stream associations before `validate()`",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4816/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22065/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22065/checks/",
    "tags": {},
    "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 D2C43C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 25 Nov 2024 00:08:47 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 09C6D65FFB;\n\tMon, 25 Nov 2024 01:08:47 +0100 (CET)",
            "from mail-40133.protonmail.ch (mail-40133.protonmail.ch\n\t[185.70.40.133])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4D2F065FC6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Nov 2024 01:08:44 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"H+eOrGK0\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1732493323; x=1732752523;\n\tbh=06YHYQTTr3Izb/QnaaCVW31lpjIOtVEF1KpBqUz4FeU=;\n\th=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:\n\tSubject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector:\n\tList-Unsubscribe:List-Unsubscribe-Post;\n\tb=H+eOrGK0lLJtTKjwvQBWQxEZLV4nze988GJ8brT9Va13rW2zxfX87BgN6WEbp1+0t\n\tJJQIrFnoPZTrmIhcuYDXDtd1+i4nyYlzBxXOi8PaItt0v/ZITvDN0eMMlfkjdMCUHc\n\t7nHM8rbpZ0B8N8/w8aE1WSzb2IAQ2lGWBGH4n8AsP06wy64nRH8zxeQUuMcp4YYRuk\n\t/k0kYwZqcd5kUfEsAcAbcwlfCG9f6OG1CyikE5Od8VgeQDTi461H8NtV1J8H7whhgU\n\tK8j3y6RlKkp49KXbrecmBAD8v1eYvSAUtSJw4QYZ/I5a913GOCxshzfRaez0tgBkoB\n\ttNtUSUvqYvuhg==",
        "Date": "Mon, 25 Nov 2024 00:08:37 +0000",
        "To": "libcamera-devel@lists.libcamera.org",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <pobrn@protonmail.com>",
        "Subject": "[PATCH v1] libcamera: camera: Fix clearing of stream associations\n\tbefore `validate()`",
        "Message-ID": "<20241125000834.396815-1-pobrn@protonmail.com>",
        "Feedback-ID": "20568564:user:proton",
        "X-Pm-Message-ID": "5fb2b12e29c82d62f85856e3bbfd745567252efb",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=utf-8",
        "Content-Transfer-Encoding": "quoted-printable",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "A copy is made in the range-based for loop, and thus `setStream()`\noperates on this copy, leading to the `stream_` member of the given\n`StreamConfiguration` object in `*config` never being set to `nullptr`.\n\nFix that by taking a reference in the range-based for loop.\n\nAlso rename the variable from `it` since it is not an iterator.\n\nFixes: 4217c9f1aa863c (\"libcamera: camera: Zero streams before validate()\")\n---\n src/libcamera/camera.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 25135d46..82a5186a 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -1178,8 +1178,8 @@ int Camera::configure(CameraConfiguration *config)\n \tif (ret < 0)\n \t\treturn ret;\n \n-\tfor (auto it : *config)\n-\t\tit.setStream(nullptr);\n+\tfor (auto &cfg : *config)\n+\t\tcfg.setStream(nullptr);\n \n \tif (config->validate() != CameraConfiguration::Valid) {\n \t\tLOG(Camera, Error)\n",
    "prefixes": [
        "v1"
    ]
}