{"id":3172,"url":"https://patchwork.libcamera.org/api/patches/3172/?format=json","web_url":"https://patchwork.libcamera.org/patch/3172/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20200318152427.13126-3-kgupta@es.iitr.ac.in>","date":"2020-03-18T15:24:24","name":"[libcamera-devel,v4,2/5] libcamera: ipa_proxy: rearrange proxies precedence","commit_ref":"1eaf7407c2a787daecfc92dc7698a4176784ff07","pull_url":null,"state":"accepted","archived":false,"hash":"ef3f55405ad05c244b558abdebdea1001d2c2171","submitter":{"id":39,"url":"https://patchwork.libcamera.org/api/people/39/?format=json","name":"Kaaira Gupta","email":"kgupta@es.iitr.ac.in"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/3172/mbox/","series":[{"id":733,"url":"https://patchwork.libcamera.org/api/series/733/?format=json","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/3172/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3172/checks/","tags":{},"headers":{"Return-Path":"<kgupta@es.iitr.ac.in>","Received":["from mail-pg1-x544.google.com (mail-pg1-x544.google.com\n\t[IPv6:2607:f8b0:4864:20::544])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3ABEB60418\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 16:25:48 +0100 (CET)","by mail-pg1-x544.google.com with SMTP id z72so4020116pgz.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 08:25:48 -0700 (PDT)","from kaaira-HP-Pavilion-Notebook ([103.113.213.153])\n\tby smtp.gmail.com with ESMTPSA id\n\t127sm7036864pfb.130.2020.03.18.08.25.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 18 Mar 2020 08:25:46 -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=itDBIeaaPZusj+vur2FE0rTJTemOWFKe6rlSI4nlGL0=;\n\tb=O05Ydm1e0XEf2pbfCdqztn7i4FotYmNsLIgf9g2EBP/6Nk95sCSqFQvt9YR8igIuv3\n\tfZ31aJMbIM2n9ClPYCXYO9cuxE9cG2Ss6/sDufoxJnifGm6IITJmsNpwQN4oVqJwTA/y\n\txar+NLagcnXf/jcWPNthOgBCo8fhzGLZ97tAoSeZxqSCdZOXklSie58/l0tJsNRB9KqF\n\tWEwcbksNKxWYiJT2T/mHAqBjFnskjr5UMEe9e/YWtWgW1mqeoDXumGeFhrafI8v7f44h\n\tWAQ/i96s1uVfjodDNhOGdVZDq1s9pJQmW5t0fOz30SZxZIst0eCiZkOAusbCdi/7HCCJ\n\toTEA==","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=itDBIeaaPZusj+vur2FE0rTJTemOWFKe6rlSI4nlGL0=;\n\tb=lGspsLKaZryxGZ8z/m3rlT9AVBYh4dlLN0PZfaJdTdcSTQU1Q1DipHR6lJwC4V+quz\n\tuQtxS5PzNbKh29/szQQu5UdE1sld8K4HBMiAuDaSadwvMNp/uPxCphpC3kywERDOnzBv\n\tlSep9dieMKjlpblBeTBviPWFIdRxWhT3F1+lyxxHumH+5QZ+oTwZzMt1MNUn0bDRZDpT\n\t+jhrvsEKE+GqCRez1NZUS60ajGvR/9PR5i5ZfmyFX/uohMOA5uVQ82lrEIGlfh1h1imL\n\t7mBqAeSG8PGhF1DfeDM2CBf3ZTFDK2epBuzaPGKaSE05CC94tHZslakffZ0ZHl6/Geyx\n\t1ysQ==","X-Gm-Message-State":"ANhLgQ2gCFBuB1jtrTXOcXHp6U3rKiNKk40I0MbkGHGT9BN8fQqwUyVE\n\tuZ2i6SHOiYqn3Z/Fws6zUMbGPg==","X-Google-Smtp-Source":"ADFU+vsGwG+UwQv2yCXW57GsMnv8ThwonScdXv9Rlre7hv5dnwo7Qinyq4235N6f8cvCGWNKVpL2hg==","X-Received":"by 2002:a63:d7:: with SMTP id 206mr5015179pga.366.1584545146792; \n\tWed, 18 Mar 2020 08:25:46 -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:24 +0530","Message-Id":"<20200318152427.13126-3-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 2/5] libcamera: ipa_proxy:\n\trearrange proxies precedence","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:48 -0000"},"content":"User environment path in LIBCAMERA_IPA_PROXY_PATH should take precedence\nover system loading locations. Change precedence accordingly\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 | 11 ++++++-----\n 1 file changed, 6 insertions(+), 5 deletions(-)","diff":"diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\nindex c7347c8..b409e1d 100644\n--- a/src/libcamera/ipa_proxy.cpp\n+++ b/src/libcamera/ipa_proxy.cpp\n@@ -75,13 +75,9 @@ IPAProxy::~IPAProxy()\n  */\n std::string IPAProxy::resolvePath(const std::string &file) const\n {\n-\t/* Try finding the exec target from the install directory first */\n \tstd::string proxyFile = \"/\" + file;\n-\tstd::string proxyPath = std::string(IPA_PROXY_DIR) + proxyFile;\n-\tif (!access(proxyPath.c_str(), X_OK))\n-\t\treturn proxyPath;\n \n-\t/* No exec target in install directory; check env variable. */\n+\t/* Check env variable first. */\n \tconst char *execPaths = utils::secure_getenv(\"LIBCAMERA_IPA_PROXY_PATH\");\n \tif (execPaths) {\n \t\tfor (const auto &dir : utils::split(execPaths, \":\")) {\n@@ -95,6 +91,11 @@ std::string IPAProxy::resolvePath(const std::string &file) const\n \t\t}\n \t}\n \n+\t/* Try finding the exec target from the install directory. */\n+\tstd::string proxyPath = std::string(IPA_PROXY_DIR) + proxyFile;\n+\tif (!access(proxyPath.c_str(), X_OK))\n+\t\treturn proxyPath;\n+\n \treturn std::string();\n }\n \n","prefixes":["libcamera-devel","v4","2/5"]}