Show a patch.

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

{
    "id": 13372,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13372/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13372/",
    "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": "<20210817031619.11587-1-laurent.pinchart@ideasonboard.com>",
    "date": "2021-08-17T03:16:19",
    "name": "[libcamera-devel] utils: ipc: ipa_proxy_worker: Log IPCUnixSocket::send() failures",
    "commit_ref": "d0d1733027c16aa3fe9b7427b4a00a126ebbc6ba",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7efdbd693558a2b70040b319086b80e70ee5f3fc",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/13372/mbox/",
    "series": [
        {
            "id": 2362,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2362/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2362",
            "date": "2021-08-17T03:16:19",
            "name": "[libcamera-devel] utils: ipc: ipa_proxy_worker: Log IPCUnixSocket::send() failures",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2362/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13372/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13372/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 C2493BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Aug 2021 03:16:32 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 26010688A2;\n\tTue, 17 Aug 2021 05:16:32 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 402B56025B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Aug 2021 05:16:30 +0200 (CEST)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C489F3E5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Aug 2021 05:16:29 +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=\"KdP55VHl\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629170189;\n\tbh=EDDit49NwvynLEAvC+fUOG963VEJS3llaSsh9siAE/Y=;\n\th=From:To:Subject:Date:From;\n\tb=KdP55VHlgNOJWf/mdt3OV/8+XU+9X0GjvdSUW+uEImLaJ75rMi2458gUX2FwG1Wtx\n\tNRvsFVDAI8hIERsrWizLrP0+eDQiX+i/9hBJkX6kePQ8wzUOBFBtgyHgsfxdVyNifO\n\tWIy8fj8ta9tvgiBpn63P4ZoSFDjo9hGpFWnNhRNQ=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 17 Aug 2021 06:16:19 +0300",
        "Message-Id": "<20210817031619.11587-1-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] utils: ipc: ipa_proxy_worker: Log\n\tIPCUnixSocket::send() failures",
        "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": "The IPCUnixSocket::send() function may fail, in which case it can be\nuseful for debugging to log an error message that tells which event was\naffected. Do so.\n\nReported-by: Coverity CID=354836\nReported-by: Coverity CID=354837\nReported-by: Coverity CID=354838\nReported-by: Coverity CID=354839\nReported-by: Coverity CID=354840\nReported-by: Coverity CID=354841\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\nThis stems from a Coverity report that complains about the lock of error\nchecking for the return value of send(). As the send() function itself\nlogs a message on failure, I'm not entirely sure if this is needed, but\nwe do so when replying to synchronous methods, and there's no reason to\nhave a different behaviour for events. We should either add a message\nhere, or drop it from method replies.\n\nKieran, is the Reported-by tag processed by any script ? Can I write\n\nReported-by: Coverity CID=354836-354841\n\nor something similar ?\n\n---\n .../libcamera_templates/module_ipa_proxy_worker.cpp.tmpl     | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\nindex 164a4dd64882..8a88bd467da7 100644\n--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy_worker.cpp.tmpl\n@@ -164,7 +164,10 @@ private:\n \n \t\t{{proxy_funcs.serialize_call(method|method_param_inputs, \"_message.data()\", \"_message.fds()\")}}\n \n-\t\tsocket_.send(_message.payload());\n+\t\tint _ret = socket_.send(_message.payload());\n+\t\tif (_ret < 0)\n+\t\t\tLOG({{proxy_worker_name}}, Error)\n+\t\t\t\t<< \"Sending event {{method.mojom_name}}() failed: \" << _ret;\n \n \t\tLOG({{proxy_worker_name}}, Debug) << \"{{method.mojom_name}} done\";\n \t}\n",
    "prefixes": [
        "libcamera-devel"
    ]
}