Show a patch.

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

{
    "id": 3163,
    "url": "https://patchwork.libcamera.org/api/patches/3163/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3163/",
    "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": "<20200318115846.7975-2-kgupta@es.iitr.ac.in>",
    "date": "2020-03-18T11:58:41",
    "name": "[libcamera-devel,v3,1/6] libcamera: ipa_proxy: use utils::split()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "860256fec01137522f813b320b3ab126c7cf6681",
    "submitter": {
        "id": 39,
        "url": "https://patchwork.libcamera.org/api/people/39/?format=api",
        "name": "Kaaira Gupta",
        "email": "kgupta@es.iitr.ac.in"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3163/mbox/",
    "series": [
        {
            "id": 731,
            "url": "https://patchwork.libcamera.org/api/series/731/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=731",
            "date": "2020-03-18T11:58:40",
            "name": "libcamera: determine IPA_PROXY_PATH at runtime",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/731/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3163/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3163/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kgupta@es.iitr.ac.in>",
        "Received": [
            "from mail-pl1-x643.google.com (mail-pl1-x643.google.com\n\t[IPv6:2607:f8b0:4864:20::643])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0C20D60419\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 12:59:12 +0100 (CET)",
            "by mail-pl1-x643.google.com with SMTP id h11so1580649plr.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 04:59:11 -0700 (PDT)",
            "from kaaira-HP-Pavilion-Notebook ([103.113.213.153])\n\tby smtp.gmail.com with ESMTPSA id\n\tk3sm6542539pfp.142.2020.03.18.04.59.09\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 18 Mar 2020 04:59:09 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=agsiwyHzfZJIIoAsTPb14yEuXD72N4ZhO6DvJhFu2dY=;\n\tb=t7iWuFgJ/CdAQPrS7GtGEY1Qaow9FN18Jt8LwE1rKWep30XNX11ess7aQxTvdc7ndM\n\tIlWHocS6GKYbTBIxxoInMdfaDtZeEQw7LxpQVDi6mmZ6K8l0q+398Gqa3c7FUVIXFekc\n\tjniLxRfZha/m5K8EsBB4b3yXWUtsZy3gAkVutZgXw6F4SAkFvVDxEPmecbCIAvxJYnBi\n\tIMYHoXcobjyMKn0+7pHMpyyq4DirBwCgFccTS8rP5iwCrkTx9pgy9nk8DPL8WmhEDwWm\n\tACc83CCTkpi/R0CJihoS0NH/nEPJLdFnNSqzbs5b0u/Lhw4WU4FXKonfuOMuBquAK1oM\n\tAQRg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=agsiwyHzfZJIIoAsTPb14yEuXD72N4ZhO6DvJhFu2dY=;\n\tb=hOo2SyE2FKSip6kuRRchqvmSIA3pnFymR7q23w4W3BgLJSFojZ/kJvNoBjR3x+dLUc\n\tbNlwJh2lFm7A57efIQcuZrvdXTOlmepE8fDBH529SDoodfGeyq967Qr7UrRQerbwN9WI\n\tUJGhOfS2bR/Lptdh7XgVddvrYDxBq0ujSu3XmMwcTHrf0RVBKtbBH7bR0f6lqTU5hh7m\n\tmMeadvh4R321ai+45gY8nyD/yfFha2VbnK2uj6cskQmyWI9d0pgxTbFqwEmCQj5/kzeq\n\tZXbtB+kXUTiewpvgXaK0wDt2F7WamdmjQRHFL4FqWIbi0dIUYIbHtF97rp14w5uEaBRh\n\t5Z6A==",
        "X-Gm-Message-State": "ANhLgQ19AYeWKTS+l9SxCxJgEWsY+1F/tB+bO8cq5AsbwDStmrv7FrQM\n\tvzpvvjbG9g1FxligudDP8zuvVQ==",
        "X-Google-Smtp-Source": "ADFU+vuwTWVey58q002cNJpgZljei5oaZDirhMs8nG30CdG12S8OUD+HwoCRPa9PeoMEz/oW+crlJQ==",
        "X-Received": "by 2002:a17:902:528:: with SMTP id\n\t37mr3641534plf.322.1584532750286; \n\tWed, 18 Mar 2020 04:59:10 -0700 (PDT)",
        "From": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "To": "Helen Koike <helen.koike@collabora.com>,\n\tVaishali Thakkar <vthakkar@vaishalithakkar.in>,\n\tkieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org",
        "Cc": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "Date": "Wed, 18 Mar 2020 17:28:41 +0530",
        "Message-Id": "<20200318115846.7975-2-kgupta@es.iitr.ac.in>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200318115846.7975-1-kgupta@es.iitr.ac.in>",
        "References": "<20200318115846.7975-1-kgupta@es.iitr.ac.in>",
        "Subject": "[libcamera-devel] [PATCH LIBCAMERA v3 1/6] libcamera: ipa_proxy:\n\tuse utils::split()",
        "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>",
        "X-List-Received-Date": "Wed, 18 Mar 2020 11:59:12 -0000"
    },
    "content": "Replace the manual string splitting with utils::split()\n\nSigned-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>\n---\n src/libcamera/ipa_proxy.cpp | 15 +++++----------\n 1 file changed, 5 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\nindex 5a3d2f1..c7347c8 100644\n--- a/src/libcamera/ipa_proxy.cpp\n+++ b/src/libcamera/ipa_proxy.cpp\n@@ -83,21 +83,16 @@ std::string IPAProxy::resolvePath(const std::string &file) const\n \n \t/* No exec target in install directory; check env variable. */\n \tconst char *execPaths = utils::secure_getenv(\"LIBCAMERA_IPA_PROXY_PATH\");\n-\twhile (execPaths) {\n-\t\tconst char *delim = strchrnul(execPaths, ':');\n-\t\tsize_t count = delim - execPaths;\n+\tif (execPaths) {\n+\t\tfor (const auto &dir : utils::split(execPaths, \":\")) {\n+\t\t\tif (dir.empty())\n+\t\t\t\tcontinue;\n \n-\t\tif (count) {\n-\t\t\tstd::string proxyPath(execPaths, count);\n+\t\t\tstd::string proxyPath = dir;\n \t\t\tproxyPath += proxyFile;\n \t\t\tif (!access(proxyPath.c_str(), X_OK))\n \t\t\t\treturn proxyPath;\n \t\t}\n-\n-\t\tif (*delim == '\\0')\n-\t\t\tbreak;\n-\n-\t\texecPaths += count + 1;\n \t}\n \n \treturn std::string();\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "1/6"
    ]
}