Show a patch.

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

{
    "id": 3147,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3147/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3147/",
    "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": "<20200318001009.32512-2-kgupta@es.iitr.ac.in>",
    "date": "2020-03-18T00:10:04",
    "name": "[libcamera-devel,v2,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/1.1/people/39/?format=api",
        "name": "Kaaira Gupta",
        "email": "kgupta@es.iitr.ac.in"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3147/mbox/",
    "series": [
        {
            "id": 729,
            "url": "https://patchwork.libcamera.org/api/1.1/series/729/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=729",
            "date": "2020-03-18T00:10:03",
            "name": "libcamera: determine IPA_PROXY_PATH at runtime",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/729/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3147/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3147/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kgupta@es.iitr.ac.in>",
        "Received": [
            "from mail-pl1-x644.google.com (mail-pl1-x644.google.com\n\t[IPv6:2607:f8b0:4864:20::644])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 701F360422\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 01:10:31 +0100 (CET)",
            "by mail-pl1-x644.google.com with SMTP id g6so10359298plt.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Mar 2020 17:10:31 -0700 (PDT)",
            "from kaaira-HP-Pavilion-Notebook ([103.113.213.153])\n\tby smtp.gmail.com with ESMTPSA id\n\te9sm4294006pfl.179.2020.03.17.17.10.28\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 17 Mar 2020 17:10:29 -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=0k3SXu/OVTTm4R1dMrdzhoOHXiYgb3hcUSCJiQW9Z7L+fLrNycL8/vCFgViU1EA7wf\n\tXEmQPYHdkM4dHV/yKpmIFJ5fN7lnvdTGtX6hed6DUxRxKepTvWLHWIWNrVNgsizec06M\n\tSVnISYlllA9o+v+gc67ii6sEaW+eFtDMxmHdn2BPO15o31mbTZRKbQ/E8+OF6y6tYXBB\n\tSBrcbzzAdFH3gJSFkV2LMvF5LspItINSWV399ye2lxGAC5kKVnhjTZsxz1riGzo17A7A\n\t9w7jjwxCHfLGDzumfFEyAZmYi1H/0yF2YGhU1NliopDOksNc8jIhRfAv9WduRNk5hFWL\n\tlB1Q==",
        "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=G1i7bkw9hJjap3mHgA/IzBEVP7+sZtTbrhksoYxHSr2Xphb8U6aZdyFfDazd37vQ0X\n\tuREMKpustnD0YL3p1nOSQglEL4DWToYL7Tu2fFZKHGqqa92NCuwhEgqV6Y6fZc3DzHoL\n\tvZh4Oe9Lh7hgkEEbn+ryyOf6cCsOTREoBATg/vU1cOuodYvDzuF74QPvY08/v3TwpQM6\n\tL2Zx4mFFbx9k3J48zHi6PCZMLuJ0OGfg1eqG6ZeTgAdjsOxrFhXP1fYwZboQuG+2D6xG\n\tkLRjzUs/CTWP22iCYDZC5sOMY1/MrUwMHboxHnS/5MlcOm9qofP0Axiv8xVavLRoi9Sx\n\t/bTw==",
        "X-Gm-Message-State": "ANhLgQ0CYV6CcoRCNpzDFKTKRdrjXSXT7tbqC9+GUnnpGimdcJlh395p\n\tPLaOgUrKBG5fghDgkzr4dOG2YA==",
        "X-Google-Smtp-Source": "ADFU+vs9GtrhwFTQ0UgvorHmnVGbxk6XZLxL4eTutZmSLSQGUWqf+vFeWmjoL3LxUu1vPUKDQX2RsQ==",
        "X-Received": "by 2002:a17:902:9b95:: with SMTP id\n\ty21mr1201488plp.101.1584490230005; \n\tTue, 17 Mar 2020 17:10:30 -0700 (PDT)",
        "From": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "To": "kieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org,\n\tHelen Koike <helen.koike@collabora.com>,\n\tVaishali Thakkar <vthakkar@vaishalithakkar.in>",
        "Cc": "Kaaira Gupta <kgupta@es.iitr.ac.in>",
        "Date": "Wed, 18 Mar 2020 05:40:04 +0530",
        "Message-Id": "<20200318001009.32512-2-kgupta@es.iitr.ac.in>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200318001009.32512-1-kgupta@es.iitr.ac.in>",
        "References": "<20200318001009.32512-1-kgupta@es.iitr.ac.in>",
        "Subject": "[libcamera-devel] [PATCH LIBCAMERA v2 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 00:10:31 -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",
        "v2",
        "1/6"
    ]
}