Show a patch.

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

{
    "id": 11552,
    "url": "https://patchwork.libcamera.org/api/patches/11552/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11552/",
    "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": "<20210312054727.852622-2-kieran.bingham@ideasonboard.com>",
    "date": "2021-03-12T05:47:20",
    "name": "[libcamera-devel,v2,1/8] utils: ipc: proxy: Assert asynchronous calls execute in the running state",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "9da43a8143feab014afccca71af60baccaee7fd9",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": {
        "id": 11,
        "url": "https://patchwork.libcamera.org/api/users/11/?format=api",
        "username": "kbingham",
        "first_name": "Kieran",
        "last_name": "Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/11552/mbox/",
    "series": [
        {
            "id": 1785,
            "url": "https://patchwork.libcamera.org/api/series/1785/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1785",
            "date": "2021-03-12T05:47:19",
            "name": "IPU3 Stability",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1785/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11552/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11552/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 5809BBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Mar 2021 05:47:35 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 61E1768C71;\n\tFri, 12 Mar 2021 06:47:33 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EE4B4605B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Mar 2021 06:47:31 +0100 (CET)",
            "from localhost.localdomain\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 789F08F9;\n\tFri, 12 Mar 2021 06:47:31 +0100 (CET)"
        ],
        "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=\"Cz+ySACz\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615528051;\n\tbh=GcS3UJ7IygbcEhkVyVKA3EqmAvhXexIHhbZv5jopVLA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Cz+ySACzj22PPIC5cu68EqEuKMlLlZfB40aApXjMFnDGrabv56b095M6f9e6ptd9e\n\tybNS9z9ZZNAMObF0od553hXdvWzEOjRZF4CrkxPbRxWcl71yiFwBnKIW2u9516tp3E\n\tZDxJe8dIKRewPGjhOU85+zzYTfZD/ZQeO0okKgJQ=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Fri, 12 Mar 2021 05:47:20 +0000",
        "Message-Id": "<20210312054727.852622-2-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210312054727.852622-1-kieran.bingham@ideasonboard.com>",
        "References": "<20210312054727.852622-1-kieran.bingham@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v2 1/8] utils: ipc: proxy: Assert\n\tasynchronous calls execute in the running state",
        "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": "From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nSignals and calls from the IPA should not occur after the IPA has been\nput into the stopped state.\n\nAdd assertions to catch and prevent any messages being processed after\nthis.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl  | 2 ++\n utils/ipc/generators/libcamera_templates/proxy_functions.tmpl | 4 ++--\n 2 files changed, 4 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\nindex f75b1206cad4..e3b541db4e36 100644\n--- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n+++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl\n@@ -173,6 +173,7 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)\n \t{%- endfor -%}\n );\n {% elif method|is_async %}\n+\tASSERT(running_);\n \tproxy_.invokeMethod(&ThreadProxy::{{method.mojom_name}}, ConnectionTypeQueued,\n \t{%- for param in method|method_param_names -%}\n \t\t{{param}}{{- \", \" if not loop.last}}\n@@ -225,6 +226,7 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)\n {% for method in interface_event.methods %}\n {{proxy_funcs.func_sig(proxy_name, method, \"Thread\")}}\n {\n+\tASSERT(running_);\n \t{{method.mojom_name}}.emit({{method.parameters|params_comma_sep}});\n }\n \ndiff --git a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl\nindex c2ac42fca45b..13dc8fdcab6e 100644\n--- a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl\n+++ b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl\n@@ -26,12 +26,12 @@\n \tif (!running_)\n \t\treturn;\n \n-\trunning_ = false;\n-\n \tproxy_.invokeMethod(&ThreadProxy::stop, ConnectionTypeBlocking);\n \n \tthread_.exit();\n \tthread_.wait();\n+\n+\trunning_ = false;\n {%- endmacro -%}\n \n \n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "1/8"
    ]
}