Show a patch.

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

{
    "id": 3171,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3171/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3171/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20200318152427.13126-2-kgupta@es.iitr.ac.in>",
    "date": "2020-03-18T15:24:23",
    "name": "[libcamera-devel,v4,1/5] libcamera: ipa_proxy: use utils::split()",
    "commit_ref": "6afe116dcc3252a8b1a357de8d9d47dbc3895329",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "860256fec01137522f813b320b3ab126c7cf6681",
    "submitter": {
        "id": 39,
        "url": "https://patchwork.libcamera.org/api/1.1/people/39/?format=api",
        "name": "Kaaira Gupta",
        "email": "kgupta@es.iitr.ac.in"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3171/mbox/",
    "series": [
        {
            "id": 733,
            "url": "https://patchwork.libcamera.org/api/1.1/series/733/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=733",
            "date": "2020-03-18T15:24:22",
            "name": "libcamera: determine IPA_PROXY_PATH at runtime",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/733/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3171/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3171/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kgupta@es.iitr.ac.in>",
        "Received": [
            "from mail-pg1-x542.google.com (mail-pg1-x542.google.com\n\t[IPv6:2607:f8b0:4864:20::542])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 44CBE60418\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 16:25:29 +0100 (CET)",
            "by mail-pg1-x542.google.com with SMTP id b22so7870300pgb.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 08:25:29 -0700 (PDT)",
            "from kaaira-HP-Pavilion-Notebook ([103.113.213.153])\n\tby smtp.gmail.com with ESMTPSA id\n\ti21sm6307560pgn.5.2020.03.18.08.25.25\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 18 Mar 2020 08:25:27 -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=xMlGiZUnX5l4eQkEGl7+Y2M2/kQ9YAni9osfJaTdfr0=;\n\tb=lQJQOsFBanfboWabMbg9NvhkhcRZdB48WUs3l+q0MY91ScCW1lufcRtfVrWH95OPsP\n\tbkBOMP64sURNaV3iy1qDvWyxbjam/gQ8y3dmtt4h9VwD2yTyEmwlMt5lgWvLXgTHpXB/\n\tum/BsD0EfuHx78Del7FniCMvcTY7NLUL6bQ4LKNTwQk5LEqN+/mumk+elnyZXtw/7AlF\n\tXUwbr2bVGcpg8EiWcFXD2lTKxKOQM9HAHda+LsOZ4FZz+NbQQn0pBLo/LGS3t64K4dI7\n\txuyjYpF3VHqwvRZZDd2HM1XkH2gJAIpeXl7Sptate1dSiJeocXJ9vpISVXh5U58U7JN+\n\tWM+A==",
        "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=xMlGiZUnX5l4eQkEGl7+Y2M2/kQ9YAni9osfJaTdfr0=;\n\tb=YEuc3GpyJlz3Yo3Ok5Z1UCSi1s0Fr5fwpcrJ7XgWHSlVV6sMCdFPhCKS28tKi1pz/z\n\tnCfN0XnWLu9fmOtNYc9UO87TMDKIzU4mGzLpBeu2kSb4LK331brdvFfRlZPPZtn3Sx+F\n\tSxgVLr52Ef7qlVVj07fmvIVG3eQvLQfERmhX05d9Btih5Gd3O/TjDb2+P3rcic5oaccX\n\t/pRDrPxmqcUxgBxePECFJw+EnqcZYYllWUZ7bwvT+kJYiRS/fufZfOaG6MaUpfPD1+JE\n\ttV4ISd1nrbhgkx2O7XTuZAmhi1Wav3au6YJ2mUipR1CtQOTeGB7rc1EkqFVWtrkrm+Qg\n\tNWYg==",
        "X-Gm-Message-State": "ANhLgQ3XT10WIMqvKR/BymT2BbAnLFQFoa3nRIykztxerDbRQdWst4Qj\n\tKvDMyae9kKJR+t4IIVctadtXHA==",
        "X-Google-Smtp-Source": "ADFU+vvq2YaXJaYHA2mDc4mMbm/r3J7i2X3YSoybeDFEdk3nIrUSx77eI8/DOtDAwX3nNOZLB/reww==",
        "X-Received": "by 2002:a63:be49:: with SMTP id g9mr5213402pgo.30.1584545127884; \n\tWed, 18 Mar 2020 08:25:27 -0700 (PDT)",
        "From": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "To": "Vaishali Thakkar <vthakkar@vaishalithakkar.in>,\n\tHelen Koike <helen.koike@collabora.com>,\n\tkieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org",
        "Cc": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "Date": "Wed, 18 Mar 2020 20:54:23 +0530",
        "Message-Id": "<20200318152427.13126-2-kgupta@es.iitr.ac.in>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200318152427.13126-1-kgupta@es.iitr.ac.in>",
        "References": "<20200318152427.13126-1-kgupta@es.iitr.ac.in>",
        "Subject": "[libcamera-devel] [PATCH LIBCAMERA v4 1/5] 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 15:25:29 -0000"
    },
    "content": "Replace the manual string splitting with utils::split()\n\nSigned-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\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",
        "v4",
        "1/5"
    ]
}