Patch Detail
Show a patch.
GET /api/patches/1096/?format=api
{ "id": 1096, "url": "https://patchwork.libcamera.org/api/patches/1096/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1096/", "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": "<20190422180740.21878-1-niklas.soderlund@ragnatech.se>", "date": "2019-04-22T18:07:40", "name": "[libcamera-devel] libcamera: camera: Check requests before queueing them", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "822387295b09eeb2760b3a7cfdc29c0394193edf", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1096/mbox/", "series": [ { "id": 265, "url": "https://patchwork.libcamera.org/api/series/265/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=265", "date": "2019-04-22T18:07:40", "name": "[libcamera-devel] libcamera: camera: Check requests before queueing them", "version": 1, "mbox": "https://patchwork.libcamera.org/series/265/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1096/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1096/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net\n\t[195.74.38.228])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A88E7600F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 Apr 2019 20:08:09 +0200 (CEST)", "from localhost.localdomain (unknown [185.224.57.161])\n\tby bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid 8a64da6b-6529-11e9-8e2c-005056917f90;\n\tMon, 22 Apr 2019 20:08:06 +0200 (CEST)" ], "X-Halon-ID": "8a64da6b-6529-11e9-8e2c-005056917f90", "Authorized-sender": "niklas@soderlund.pp.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 22 Apr 2019 20:07:40 +0200", "Message-Id": "<20190422180740.21878-1-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.21.0", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: camera: Check requests before\n\tqueueing them", "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, 22 Apr 2019 18:08:10 -0000" }, "content": "Make sure all requests queued to a camera only contains streams which\nhave been configured and belongs to the camera.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/camera.cpp | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\nindex 655996f26224ef49..36c7584e823eb580 100644\n--- a/src/libcamera/camera.cpp\n+++ b/src/libcamera/camera.cpp\n@@ -747,6 +747,15 @@ int Camera::queueRequest(Request *request)\n \t\treturn ret;\n \t}\n \n+\tfor (auto const &it : request->buffers()) {\n+\t\tStream *stream = it.first;\n+\t\tif (activeStreams_.find(stream) == activeStreams_.end()) {\n+\t\t\tLOG(Camera, Error)\n+\t\t\t\t<< \"Attempt to queue request with invalid stream\";\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t}\n+\n \treturn pipe_->queueRequest(this, request);\n }\n \n", "prefixes": [ "libcamera-devel" ] }