From patchwork Fri Dec 11 12:05:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Heider X-Patchwork-Id: 1414869 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=u1yMvr2R; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=psQi2hrt; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CsqKB4BhDz9sTX for ; Fri, 11 Dec 2020 23:07:10 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jh5f1TyO0+7SLOWAucZP8LtSc5056bUFfCQ1ujxxcjc=; b=u1yMvr2RIe3Ik5pxq3aSn4u6OK qnroYH8BpQ/an7OepObgQowBG4wQ2kYBtRrkuGLLKCUcoKxsqIiDtR1ameEJ1am8RXCwpBANCW9So 21sdgc5dYNvPX1XLvo+QmjR/uQgzTcYQFalPnwjQ1EezJ1UMdv9iCF4twSM3RYuA+jHffPuuOWTLi vmo3hprEKd8WhixgXwIge3FEwQITYNgLqPJIDw4KfcfsF6uV9rWFPOTlDyohHG7pV42kqApDyTLGq OegmdE0lIeG5artTTVpDg2EEEfFsl0jx6lh3sbutNUZ3dRvuaaJaraIZL85t4cbNfeXtbgUzW+eq/ WuKJj+5g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knhB7-0005N9-19; Fri, 11 Dec 2020 12:05:41 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knhAn-0005HM-N5 for openwrt-devel@lists.openwrt.org; Fri, 11 Dec 2020 12:05:26 +0000 Received: by mail-wm1-x343.google.com with SMTP id c198so7356977wmd.0 for ; Fri, 11 Dec 2020 04:05:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=r8QMUN7bpRDQYZAGe2PqJIuRKl3puiwiA5Rmz/UTmpM=; b=psQi2hrtGlqgGzf6xUvsDN37zj+AWcy3NMfErKKtWQdrF4NytZYFSCVBsl87zIjluu TJQQ/NPvs8775VQmin58weiug6F/7/hyS8pS3bJCcsh0aqnqov0g/MfM+7+E0kp+dLyk Pmy0TjWF39/qlxHcduzxIgN+HcEqDLH04gJDR7sNlVosc/N+sXbkfEPlHhCw9VZdeSHv XH/MOgcQY5TkwSOY1L9+RwjhJWOhEV3zwibiI/PtZ2uKuNTaljKaMm90fOMDzsDp8oAb VsPIhKZEqogoE/nFCqW0q5e4p2CshjJpuBFG8AV0PgKoE0bLdRaVhsFkv1MCdmYqyzUl eHyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r8QMUN7bpRDQYZAGe2PqJIuRKl3puiwiA5Rmz/UTmpM=; b=oxhMBwaYpXHjM3Rg5iSN6uAF7pXfx8wCZY/YyuwaFyWe1w23r1vELSMA1dS32yFNsq D6Wyi4GxBBuM8ivEcFJhoUhemFJe2WNECeMoGc/RGINzFEzW+vNmr8pJxgj5XSSc3AmD dDEZ/y2uodO+khBTmtbgzEpTO0Iv7Zx+vuxvAvYIWJ0HvHCvYLQTHgpbjJYZ3/zxJaiZ bvaK8ylLXGemUT8Jc3KemirzsaSy3/aw+8+stfQUcYNAdWh6/LBEjgqrkUOyGzxOQz4F ShhGFUJBuKPHIxZ1A3DQnnrMAXo/a4Uu0iHnt1JDNZvF4F/ZK0SOB8RVZF0rL/nDB4xb GwPg== X-Gm-Message-State: AOAM530Yp0c4TLl2E+uJTOQmbYdFnQYiEfRuAP2KYY8vpRsybVdXC1Lw 05OmYTaYGoIwvJ/JxlMyXB+/BV+UrsvLig== X-Google-Smtp-Source: ABdhPJyt3OXYGkOQBHOpDAE3KJqlrvjSYwAz6v3we/y5gh4NQx0ZH4XSUpH6FmCgB/L5luK2s7VEBQ== X-Received: by 2002:a1c:5605:: with SMTP id k5mr13245713wmb.99.1607688320488; Fri, 11 Dec 2020 04:05:20 -0800 (PST) Received: from mamamia.internal (a89-182-180-166.net-htp.de. [89.182.180.166]) by smtp.gmail.com with ESMTPSA id l1sm14552616wmi.15.2020.12.11.04.05.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 04:05:19 -0800 (PST) From: Andre Heider To: openwrt-devel@lists.openwrt.org Subject: [luci PATCH 06/13] rpcd-mod-luci: get rid of now unused getDSLStatus ubus rpc Date: Fri, 11 Dec 2020 13:05:06 +0100 Message-Id: <20201211120513.1130247-7-a.heider@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201211120513.1130247-1-a.heider@gmail.com> References: <20201211120513.1130247-1-a.heider@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201211_070521_871656_6206EEF9 X-CRM114-Status: GOOD ( 11.14 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [a.heider[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Good riddance. Signed-off-by: Andre Heider --- libs/rpcd-mod-luci/src/luci.c | 55 ----------------------------------- 1 file changed, 55 deletions(-) diff --git a/libs/rpcd-mod-luci/src/luci.c b/libs/rpcd-mod-luci/src/luci.c index 94ccdf271..abf4b9ba5 100644 --- a/libs/rpcd-mod-luci/src/luci.c +++ b/libs/rpcd-mod-luci/src/luci.c @@ -1695,60 +1695,6 @@ rpc_luci_get_board_json(struct ubus_context *ctx, struct ubus_object *obj, return UBUS_STATUS_OK; } -static int -rpc_luci_get_dsl_status(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - char line[128], *p, *s; - FILE *cmd; - - cmd = popen("/etc/init.d/dsl_control lucistat", "r"); - - if (!cmd) - return UBUS_STATUS_NOT_FOUND; - - blob_buf_init(&blob, 0); - - while (fgets(line, sizeof(line), cmd)) { - if (strncmp(line, "dsl.", 4)) - continue; - - p = strchr(line, '='); - - if (!p) - continue; - - s = p + strlen(p) - 1; - - while (s >= p && isspace(*s)) - *s-- = 0; - - *p++ = 0; - - if (!strcmp(p, "nil")) - continue; - - if (isdigit(*p)) { - blobmsg_add_u32(&blob, line + 4, strtoul(p, NULL, 0)); - } - else if (*p == '"') { - s = p + strlen(p) - 1; - - if (s >= p && *s == '"') - *s = 0; - - blobmsg_add_string(&blob, line + 4, p + 1); - } - } - - fclose(cmd); - - ubus_send_reply(ctx, req, blob.head); - return UBUS_STATUS_OK; -} - - enum { RPC_L_FAMILY, __RPC_L_MAX, @@ -1859,7 +1805,6 @@ rpc_luci_api_init(const struct rpc_daemon_ops *o, struct ubus_context *ctx) UBUS_METHOD_NOARG("getHostHints", rpc_luci_get_host_hints), UBUS_METHOD_NOARG("getDUIDHints", rpc_luci_get_duid_hints), UBUS_METHOD_NOARG("getBoardJSON", rpc_luci_get_board_json), - UBUS_METHOD_NOARG("getDSLStatus", rpc_luci_get_dsl_status), UBUS_METHOD("getDHCPLeases", rpc_luci_get_dhcp_leases, rpc_get_leases_policy) };