Patch Detail
Show a patch.
GET /api/patches/1529/?format=api
{ "id": 1529, "url": "https://patchwork.libcamera.org/api/patches/1529/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1529/", "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": "<20190630162514.20522-2-niklas.soderlund@ragnatech.se>", "date": "2019-06-30T16:25:12", "name": "[libcamera-devel,v2,1/3] libcamera: timer: Stop timer when it is deleted", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "342d0e212c69fde9831839aedf4b49642469d2af", "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/1529/mbox/", "series": [ { "id": 382, "url": "https://patchwork.libcamera.org/api/series/382/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=382", "date": "2019-06-30T16:25:12", "name": "libcamera: ipc: unix: Add a IPC mechanism based on Unix sockets", "version": 2, "mbox": "https://patchwork.libcamera.org/series/382/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1529/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1529/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6309160BC7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 30 Jun 2019 18:25:31 +0200 (CEST)", "from bismarck.berto.se (unknown [145.14.112.32])\n\tby bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid a0ff70a1-9b53-11e9-8ab4-005056917a89;\n\tSun, 30 Jun 2019 18:25:10 +0200 (CEST)" ], "X-Halon-ID": "a0ff70a1-9b53-11e9-8ab4-005056917a89", "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": "Sun, 30 Jun 2019 18:25:12 +0200", "Message-Id": "<20190630162514.20522-2-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190630162514.20522-1-niklas.soderlund@ragnatech.se>", "References": "<20190630162514.20522-1-niklas.soderlund@ragnatech.se>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 1/3] libcamera: timer: Stop timer when\n\tit is deleted", "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": "Sun, 30 Jun 2019 16:25:31 -0000" }, "content": "If a timer is running while it's deleted it is still register with the\nevent dispatcher. This causes a segmentation fault when the timer\ntime-out and its signal is emitted. Fix this my stopping the timer when\nit's deleted.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n include/libcamera/timer.h | 1 +\n src/libcamera/timer.cpp | 5 +++++\n 2 files changed, 6 insertions(+)", "diff": "diff --git a/include/libcamera/timer.h b/include/libcamera/timer.h\nindex 97dcc01f493dc70d..f082339b1fed9de7 100644\n--- a/include/libcamera/timer.h\n+++ b/include/libcamera/timer.h\n@@ -17,6 +17,7 @@ class Timer\n {\n public:\n \tTimer();\n+\t~Timer();\n \n \tvoid start(unsigned int msec);\n \tvoid stop();\ndiff --git a/src/libcamera/timer.cpp b/src/libcamera/timer.cpp\nindex 1cce45085c61be2f..0dcb4e767be30b32 100644\n--- a/src/libcamera/timer.cpp\n+++ b/src/libcamera/timer.cpp\n@@ -43,6 +43,11 @@ Timer::Timer()\n {\n }\n \n+Timer::~Timer()\n+{\n+\tstop();\n+}\n+\n /**\n * \\brief Start or restart the timer with a timeout of \\a msec\n * \\param[in] msec The timer duration in milliseconds\n", "prefixes": [ "libcamera-devel", "v2", "1/3" ] }