From patchwork Sat Feb 29 01:35:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 1020 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id IILeH/JaWl53VAAAIUCqbw for ; Sat, 29 Feb 2020 07:37:06 -0500 Received: from proxy2.mail.ord1d.rsapps.net ([172.30.191.6]) by director11.mail.ord1d.rsapps.net with LMTP id 6La0H/JaWl7lfgAAvGGmqA ; Sat, 29 Feb 2020 07:37:06 -0500 Received: from smtp21.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy2.mail.ord1d.rsapps.net with LMTP id 2B64HvJaWl7/AwAAfawv4w ; Sat, 29 Feb 2020 07:37:06 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp21.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: 3180682c-5af0-11ea-beb4-525400a98691-1-1 Received: from [216.105.38.7] ([216.105.38.7:36424] helo=lists.sourceforge.net) by smtp21.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id C7/E6-13473-2FA5A5E5; Sat, 29 Feb 2020 07:37:06 -0500 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1j81LX-0005dW-0P; Sat, 29 Feb 2020 12:35:55 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1j81LV-0005dB-H5 for openvpn-devel@lists.sourceforge.net; Sat, 29 Feb 2020 12:35:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XBF+xKU8SDEo5AwTgoxr/CwiJrkl/2OciYVybAWgxbk=; b=M9i55nXl2lhITK3yJex7qHQR1q XaZ1Epsz8dV+1++gxb45Q3hrYtQqJiqDc8/PY4jwIR48M9fWpBj4IxCqvrckxC3WbYx/e47RG9pAg TWBtDG3eOa1YgAjQ+naH5DtBFP+GXvlGWHGpwIiZ7W1odsMmuz3gl4VVfnIG0dPYNYq4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=XBF+xKU8SDEo5AwTgoxr/CwiJrkl/2OciYVybAWgxbk=; b=DPyphYlRenLp9wuZwhkWWq6Ywo 20noqLSoFSBiH6oQJOgDMi8vHaWzNzW45kgV3GYeYqHqMg0AHmJtpLcj+EkXtDgOhYDMXK4xgcdeH lcyZkmtiHtQfj704o7yQiFxRSbdIf02AmfCugBNcNsk/29w2tgcMAd47Re70/fJEff7Q=; Received: from mail-lj1-f193.google.com ([209.85.208.193]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1j81LR-009HAU-Jz for openvpn-devel@lists.sourceforge.net; Sat, 29 Feb 2020 12:35:53 +0000 Received: by mail-lj1-f193.google.com with SMTP id r19so6424488ljg.3 for ; Sat, 29 Feb 2020 04:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=XBF+xKU8SDEo5AwTgoxr/CwiJrkl/2OciYVybAWgxbk=; b=gjSefiNSEPng3kYv1IZtHcBl/dx39Qe2Ibe3LIpmx5C7tjhqaASWibnJKCkA2Lj4m0 Pp9jPBmTs+P3z/Z4odtfhSobCS+c7EVQUb0iRFEUjrQZmSGFs3skABytKv5ApvMl2KyS uo4En4CTg2swl8PY/S3P7mZ3kfxP5uMUS9LcJnuvQSXHIWsEmZZoVXYD4Rv3IjIuJOT0 gL7ID+Uzzb+fguf1cB9c+H8BGmqPJRb1lef+VA6MyWPAFNEH9KUrk/iEe4/rFd95iZRa bZsFEIiIdVGvDISnHZrp9r0JBOsEBoBwN6d9m1+jd3OKushu/phhYUsWEgNEmH9mD5s6 57bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=XBF+xKU8SDEo5AwTgoxr/CwiJrkl/2OciYVybAWgxbk=; b=Wmqzig/TM8yZMOGD9p5/+P3SjAXMCydJsVaAiw7RuzwIMQDgq5ScfBs+um8bOdBH0X ePGECnCcw2BZc/bVF1BI4H0r7elqMvRsrNPko4Gzj5IzPkZMHLX+0iFTYk6v/YQS67BB 8honmxLUDDEbX6g8u2qjHqZa07FPcXVj2QwJu/7q84dhoeW8rE7szoh+XFRCiY341CjP MMqr5lrSSLgp1nbihTlrcA+dXm/FqbnC7rjEI33TFr82fOspJrRjGZz8hr9VMtc4ub63 31Fik7mheSoqefs41CeJMYai18lnDiCJmR6gfVmxFNt9S8u3u/416uNSIycMIFXEZr1g AcNg== X-Gm-Message-State: ANhLgQ2QyFmd8j2kIwbIn9cYwea3NNcOKhHMpKvZMgJqPnLljkcZ3DP6 izR88hb9wU3UfblhYAhUfjab3FPOGWjzwA== X-Google-Smtp-Source: ADFU+vsxV2xqO/ocrzVUtlVKtB8FIY4lHDLVEP8VIQt8FkcVKfwgc4UiWr5/bJX/D/S7JV9TDSVKrw== X-Received: by 2002:a2e:914d:: with SMTP id q13mr5875144ljg.198.1582979742435; Sat, 29 Feb 2020 04:35:42 -0800 (PST) Received: from LAPTOP-4L3N7KFS.localdomain ([83.145.195.18]) by smtp.gmail.com with ESMTPSA id a6sm2103291ljj.82.2020.02.29.04.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Feb 2020 04:35:41 -0800 (PST) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Sat, 29 Feb 2020 14:35:15 +0200 Message-Id: <20200229123515.9745-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lstipakov[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.193 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [83.145.195.18 listed in zen.spamhaus.org] 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: openvpn.net] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.193 listed in wl.mailspike.net] -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_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1j81LR-009HAU-Jz Subject: [Openvpn-devel] [PATCH] interactive.c: remove unused function X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lev Stipakov MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Lev Stipakov Function ReturnOpenvpnOutput was used to read openvpn process output and write it to openvpn-gui. Commit 852f1e4 has directed stdout/stderr streams of openvpn process to NUL, after which ReturnOpenvpnOutput() has become unused. Signed-off-by: Lev Stipakov Acked-by: --- src/openvpnserv/interactive.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index 8da49be6..1f13163e 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -361,31 +361,6 @@ ReturnLastError(HANDLE pipe, LPCWSTR func) ReturnError(pipe, GetLastError(), func, 1, &exit_event); } - -static VOID -ReturnOpenvpnOutput(HANDLE pipe, HANDLE ovpn_output, DWORD count, LPHANDLE events) -{ - WCHAR *wide_output = NULL; - CHAR output[512]; - DWORD size; - - ReadFile(ovpn_output, output, sizeof(output), &size, NULL); - if (size == 0) - { - return; - } - - wide_output = malloc((size) * sizeof(WCHAR)); - if (wide_output) - { - MultiByteToWideChar(CP_UTF8, 0, output, size, wide_output, size); - wide_output[size - 1] = 0; - } - - ReturnError(pipe, ERROR_OPENVPN_STARTUP, wide_output, count, events); - free(wide_output); -} - /* * Validate options against a white list. Also check the config_file is * inside the config_dir. The white list is defined in validate.c