Show a patch.

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

{
    "id": 10049,
    "url": "https://patchwork.libcamera.org/api/patches/10049/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10049/",
    "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": "<20201013151241.3557005-4-kieran.bingham@ideasonboard.com>",
    "date": "2020-10-13T15:12:34",
    "name": "[libcamera-devel,03/10] libcamera: thread: Prevent aliasing of signal name",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "90258bd9b6d3a00121e99239bc30ef0459f474f0",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/10049/mbox/",
    "series": [
        {
            "id": 1374,
            "url": "https://patchwork.libcamera.org/api/series/1374/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1374",
            "date": "2020-10-13T15:12:31",
            "name": "Shadowed Variables",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1374/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10049/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10049/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 5636FBEEE1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Oct 2020 15:12:51 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4CFCA60E8A;\n\tTue, 13 Oct 2020 17:12:50 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 77FED60CE6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Oct 2020 17:12:47 +0200 (CEST)",
            "from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net\n\t[86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1CC60B87;\n\tTue, 13 Oct 2020 17:12:47 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"MC83o4dl\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1602601967;\n\tbh=tWt31P6uv237PuiVO5cQMJpVSWUDGrxaoD3rm/8SIAE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=MC83o4dliC3JghtX4/UA6Jmj9Q+7bBlRvy2uXFVA96MHMRBo/j71M6o3THqjHOzKh\n\t4IXffMk2OpuSYfvPopo74OjfBLkOM5gYfnAb9bPK9izP7q5dnhLJiEInFY1UGti2jy\n\tKLSz4GWoZOfILSwBJgqubelJmPG2snSkLnxy7eUQ=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Tue, 13 Oct 2020 16:12:34 +0100",
        "Message-Id": "<20201013151241.3557005-4-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20201013151241.3557005-1-kieran.bingham@ideasonboard.com>",
        "References": "<20201013151241.3557005-1-kieran.bingham@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 03/10] libcamera: thread: Prevent aliasing\n\tof signal name",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The Thread::wait() function creates a boolean flag 'finished' which\naliases the internal member signal of the same name.\n\nRename the boolean flag to prevent confusion and aliasing of the signal.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/thread.cpp | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/thread.cpp b/src/libcamera/thread.cpp\nindex 87006a9c4301..b5d7103ad341 100644\n--- a/src/libcamera/thread.cpp\n+++ b/src/libcamera/thread.cpp\n@@ -374,7 +374,7 @@ void Thread::exit(int code)\n  */\n bool Thread::wait(utils::duration duration)\n {\n-\tbool finished = true;\n+\tbool hasFinished = true;\n \n \t{\n \t\tMutexLocker locker(data_->mutex_);\n@@ -382,14 +382,14 @@ bool Thread::wait(utils::duration duration)\n \t\tif (duration == utils::duration::max())\n \t\t\tdata_->cv_.wait(locker, [&]() { return !data_->running_; });\n \t\telse\n-\t\t\tfinished = data_->cv_.wait_for(locker, duration,\n-\t\t\t\t\t\t       [&]() { return !data_->running_; });\n+\t\t\thasFinished = data_->cv_.wait_for(locker, duration,\n+\t\t\t\t\t\t\t  [&]() { return !data_->running_; });\n \t}\n \n \tif (thread_.joinable())\n \t\tthread_.join();\n \n-\treturn finished;\n+\treturn hasFinished;\n }\n \n /**\n",
    "prefixes": [
        "libcamera-devel",
        "03/10"
    ]
}