{"id":3141,"url":"https://patchwork.libcamera.org/api/1.1/patches/3141/?format=json","web_url":"https://patchwork.libcamera.org/patch/3141/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20200317173145.18226-2-kgupta@es.iitr.ac.in>","date":"2020-03-17T17:31:42","name":"[libcamera-devel,1/4] libcamera: ipa_proxy: use utils::split()","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"00434145f12c89f785d1ab9d693e1b503f851b3e","submitter":{"id":39,"url":"https://patchwork.libcamera.org/api/1.1/people/39/?format=json","name":"Kaaira Gupta","email":"kgupta@es.iitr.ac.in"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/3141/mbox/","series":[{"id":727,"url":"https://patchwork.libcamera.org/api/1.1/series/727/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=727","date":"2020-03-17T17:31:41","name":"libcamera: determine IPA_PROXY_PATH at runtime","version":1,"mbox":"https://patchwork.libcamera.org/series/727/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3141/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3141/checks/","tags":{},"headers":{"Return-Path":"<kgupta@es.iitr.ac.in>","Received":["from mail-pf1-x441.google.com (mail-pf1-x441.google.com\n\t[IPv6:2607:f8b0:4864:20::441])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 96B1462923\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Mar 2020 18:32:23 +0100 (CET)","by mail-pf1-x441.google.com with SMTP id f206so1318271pfa.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Mar 2020 10:32:23 -0700 (PDT)","from kaaira-HP-Pavilion-Notebook ([103.113.213.153])\n\tby smtp.gmail.com with ESMTPSA id\n\t66sm3873965pfb.150.2020.03.17.10.32.20\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 17 Mar 2020 10:32:21 -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=937pg80/2jSGNdf30pGtilFr29to8/0csaOJIrbvAUg=;\n\tb=tTbKdGef7s99K0RHj5xZ53cVVOCyQ5UTsmTfqgkU0Fw0Kfax/EIUi5c25Xu7cFAiEt\n\t6PAmG4zwv1qG9WWjE85cEAvIf0L64p5ozsRH4IbUM7/EdhyGzF8mnf+bjk8jQZQHIKHm\n\tmnMYGIiD07j40jlS1QHawPSEkelXbHYhnQ7p46RYDLIRIcHIOBjpFoljPnYc9EBeYYSA\n\t+A552lQfNpdgGdYY2sW5c6AUfUL8ctEovnIE35EUysCiCgK3XBoy5m/8KlRIKxozhKyj\n\t2jAH34wLez9Nfk4r4MphHYPuPDHk2UAqqwJZpmjaCJKOw7b6iJL/s2LNGanLAnhYNdGJ\n\tSQWA==","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=937pg80/2jSGNdf30pGtilFr29to8/0csaOJIrbvAUg=;\n\tb=EB7JTJHiTBi2dYI4SEv9nBgk8isdQnyuOCGjYVhzIrCr3Um/38+t3bpTG/sAypaaZN\n\tf45UNdbUVWWRjCCxlmUB7F9KRplp3WlBlgHq2LrQh8BbrqXIzCgxUxl9BwEMxCio1+Ed\n\tonNe3CeVX8y/riYJLMk13DrkOQbfwFYfsCK/7ymP15SVQIPGj0BKSltQh0g7qZ78FM+P\n\tofzXdHdeT4rLjs3aq6iL6jS+7mRzWrsf7EmpuhWWnka+X/O3CjoGwt0mdYNuVeFLsG9f\n\tzFNDAUcM3UeV1YkvvxX53Fea7jE1QxaGY6KZV14eugnkjh1uLTg65kddU50tA9msLDug\n\tLzWQ==","X-Gm-Message-State":"ANhLgQ3pGgwT6Q4sLydPcmwYxF7VNFazcuJKxPSEbuLWO/BhJmckTToo\n\tW5GSykrJnClG9XFnlC6h34gMtg==","X-Google-Smtp-Source":"ADFU+vuFeCZh4DEW5DbFML3gFikvH+0M9nCUq1lxbSaMbPizda0XR88KDIa0g82asP6fqSQE/HPvJw==","X-Received":"by 2002:a62:1dd0:: with SMTP id d199mr6663352pfd.9.1584466341826;\n\tTue, 17 Mar 2020 10:32:21 -0700 (PDT)","From":"Kaaira Gupta <kgupta@es.iitr.ac.in>","To":"libcamera-devel@lists.libcamera.org, kieran.bingham@ideasonboard.com,\n\tHelen Koike <helen.koike@collabora.com>,\n\tVaishali Thakkar <vthakkar@vaishalithakkar.in>","Cc":"Kaaira Gupta <kgupta@es.iitr.ac.in>","Date":"Tue, 17 Mar 2020 23:01:42 +0530","Message-Id":"<20200317173145.18226-2-kgupta@es.iitr.ac.in>","X-Mailer":"git-send-email 2.17.1","In-Reply-To":"<20200317173145.18226-1-kgupta@es.iitr.ac.in>","References":"<20200317173145.18226-1-kgupta@es.iitr.ac.in>","Subject":"[libcamera-devel] [PATCH LIBCAMERA 1/4] libcamera: ipa_proxy: use\n\tutils::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":"Tue, 17 Mar 2020 17:32:23 -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 | 17 +++++------------\n 1 file changed, 5 insertions(+), 12 deletions(-)","diff":"diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\nindex 5a3d2f1..e04117c 100644\n--- a/src/libcamera/ipa_proxy.cpp\n+++ b/src/libcamera/ipa_proxy.cpp\n@@ -83,23 +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-\n-\t\tif (count) {\n-\t\t\tstd::string proxyPath(execPaths, count);\n+\tif (execPaths) {\n+\t\tfor (const auto &dir : utils::split(execPaths, \":\")){\n+\t\t\tif (dir.empty())\n+\t\t\t\tcontinue;\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 }\n \n","prefixes":["libcamera-devel","1/4"]}