Show a patch.

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

{
    "id": 995,
    "url": "https://patchwork.libcamera.org/api/patches/995/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/995/",
    "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": "<20190415231859.9747-3-jacopo@jmondi.org>",
    "date": "2019-04-15T23:18:54",
    "name": "[libcamera-devel,v5,2/7] libcamera: camera: Propagate freeBuffers() error",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "06f9d63d96b8308d0d724a84053ecec256b54a00",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/995/mbox/",
    "series": [
        {
            "id": 251,
            "url": "https://patchwork.libcamera.org/api/series/251/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=251",
            "date": "2019-04-15T23:18:52",
            "name": "libcamera: Framework changes to prepare for multiple streams support",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/251/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/995/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/995/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net\n\t[217.70.183.201])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BFB5160B2E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Apr 2019 01:18:19 +0200 (CEST)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 4F3811BF203;\n\tMon, 15 Apr 2019 23:18:19 +0000 (UTC)"
        ],
        "X-Originating-IP": "2.224.242.101",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 16 Apr 2019 01:18:54 +0200",
        "Message-Id": "<20190415231859.9747-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190415231859.9747-1-jacopo@jmondi.org>",
        "References": "<20190415231859.9747-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 2/7] libcamera: camera: Propagate\n\tfreeBuffers() error",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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>",
        "X-List-Received-Date": "Mon, 15 Apr 2019 23:18:19 -0000"
    },
    "content": "The error return code of PipelineHandler::freeBuffers() was not\npropagate up to applications by the Camera class. Fix this by returning\nthe incremental error accumulated by multiple calls (one per Stream)\nto freeBuffers().\n\nDo not return the error code of the call to freeBuffers() in the\nallocateBuffers() method error path not to overwrite the original error\ncode returned from the allocation method.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/camera.cpp | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex bdf14b31d8ee..7f2dc904df16 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -671,6 +671,8 @@ int Camera::allocateBuffers()\n  */\n int Camera::freeBuffers()\n {\n+\tint ret = 0;\n+\n \tif (!stateIs(CameraPrepared))\n \t\treturn -EACCES;\n \n@@ -683,12 +685,12 @@ int Camera::freeBuffers()\n \t\t * by the V4L2 device that has allocated them.\n \t\t */\n \t\tstream->bufferPool().destroyBuffers();\n-\t\tpipe_->freeBuffers(this, stream);\n+\t\tret |= pipe_->freeBuffers(this, stream);\n \t}\n \n \tstate_ = CameraConfigured;\n \n-\treturn 0;\n+\treturn ret;\n }\n \n /**\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "2/7"
    ]
}