Show a patch.

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

{
    "id": 11648,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/11648/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11648/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20210323014226.3211412-4-hiroh@chromium.org>",
    "date": "2021-03-23T01:42:21",
    "name": "[libcamera-devel,3/8] android: CameraHalManager: Fix a function call of a moved Camera",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b15fb88c5fa0a0e6eb013a8449316f13cd76976b",
    "submitter": {
        "id": 63,
        "url": "https://patchwork.libcamera.org/api/1.1/people/63/?format=api",
        "name": "Hirokazu Honda",
        "email": "hiroh@chromium.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11648/mbox/",
    "series": [
        {
            "id": 1817,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1817/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1817",
            "date": "2021-03-23T01:42:18",
            "name": "Improve pointer types in android HAL adaptation layer",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1817/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11648/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11648/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 7E58AC32E1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Mar 2021 01:42:45 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 32FBA68D71;\n\tTue, 23 Mar 2021 02:42:45 +0100 (CET)",
            "from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com\n\t[IPv6:2607:f8b0:4864:20::102b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6F48168D71\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Mar 2021 02:42:42 +0100 (CET)",
            "by mail-pj1-x102b.google.com with SMTP id\n\tx7-20020a17090a2b07b02900c0ea793940so11495543pjc.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 Mar 2021 18:42:42 -0700 (PDT)",
            "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:8115:e5cc:747b:64de])\n\tby smtp.gmail.com with ESMTPSA id\n\th13sm590527pjv.52.2021.03.22.18.42.39\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 22 Mar 2021 18:42:40 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"Ej0jtTg5\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=v2/oim4Rfz4IZCVjag7lbWijILii27gCvbe9QBaHfhw=;\n\tb=Ej0jtTg5/wMOK6wNJ9Wcs+KAilwsIlo8I3cn2lh3GNVaqMxhSvLg+/c3k0RdaB5F6X\n\tpMZVYTzbl+iQ4TMCww/KsO1/iaFTq0zWg70LxAHP4plgwsen0t+KvbRRvg7QdJpRyerp\n\tmTu6cyjgSsX36yd2dzEM/TRsgn6J818iciLZU=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=v2/oim4Rfz4IZCVjag7lbWijILii27gCvbe9QBaHfhw=;\n\tb=rWCh1D0qmbMF1PnTUKG2/FkhMk/usIpYrhkCJG3XidZvRIpAC+CoFbUMRZHVuREcve\n\t+YOafMtOYpzJP21BTg3dHCcd+PSz68zVhrCd9cRwLAl9RuXLP5WvLlfEqZUNYMtq8tPs\n\tDXIEYDCIEijcAIo9NGuNNgN9yh2QSaGo/7DPH0EHGHLsiUoJU+ih47ww2louM1EMr7te\n\tf7xY7+FXJyX5dujeaF5szGAfmgM+2GezK6JF4EgKn4U9eBN1eqV1gCnpUC68OCK+aDN7\n\tIgd7vtYc2XxnkqxFQLAklOJjGE8e2r0JKGBkMOFk0QRQR7KXLgsLCEFKpMXr2xx9C0Zf\n\tagfQ==",
        "X-Gm-Message-State": "AOAM531bwTf2qgRwNHZ0llDpABNJQdz2Z9Whv7C/6YhX60MO79uWs/T9\n\tHFrC62Biv8YDZshkrQUB1uEXEoa6Rwh/gw==",
        "X-Google-Smtp-Source": "ABdhPJw+1UGvln5QxgVjzz88tMc6ZMxMT4quPI4XTQ26tZR98UImVJuyt5eeTo39XTwSovfyg466zQ==",
        "X-Received": "by 2002:a17:90b:108f:: with SMTP id\n\tgj15mr1896055pjb.177.1616463760384; \n\tMon, 22 Mar 2021 18:42:40 -0700 (PDT)",
        "From": "Hirokazu Honda <hiroh@chromium.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 23 Mar 2021 10:42:21 +0900",
        "Message-Id": "<20210323014226.3211412-4-hiroh@chromium.org>",
        "X-Mailer": "git-send-email 2.31.0.rc2.261.g7f71774620-goog",
        "In-Reply-To": "<20210323014226.3211412-1-hiroh@chromium.org>",
        "References": "<20210323014226.3211412-1-hiroh@chromium.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 3/8] android: CameraHalManager: Fix a\n\tfunction call of a moved Camera",
        "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": "This fixes a bug of calling Camera::id() of a moved Camera.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n\n---\n src/android/camera_hal_manager.cpp | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\n--\n2.31.0.rc2.261.g7f71774620-goog",
    "diff": "diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp\nindex fa398fea..df3f1cd2 100644\n--- a/src/android/camera_hal_manager.cpp\n+++ b/src/android/camera_hal_manager.cpp\n@@ -95,7 +95,8 @@ void CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n \t * IDs starts from '0' for internal cameras and '1000' for external\n \t * cameras.\n \t */\n-\tauto iter = cameraIdsMap_.find(cam->id());\n+\tstd::string cameraId = cam->id();\n+\tauto iter = cameraIdsMap_.find(cameraId);\n \tif (iter != cameraIdsMap_.end()) {\n \t\tid = iter->second;\n \t} else {\n@@ -117,12 +118,12 @@ void CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n \tstd::unique_ptr<CameraDevice> camera = CameraDevice::create(id, std::move(cam));\n \tint ret = camera->initialize();\n \tif (ret) {\n-\t\tLOG(HAL, Error) << \"Failed to initialize camera: \" << cam->id();\n+\t\tLOG(HAL, Error) << \"Failed to initialize camera: \" << cameraId;\n \t\treturn;\n \t}\n\n \tif (isCameraNew) {\n-\t\tcameraIdsMap_.emplace(cam->id(), id);\n+\t\tcameraIdsMap_.emplace(cameraId, id);\n\n \t\tif (isCameraExternal)\n \t\t\tnextExternalCameraId_++;\n",
    "prefixes": [
        "libcamera-devel",
        "3/8"
    ]
}