From patchwork Wed Sep 23 20:55:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristof Provost via Openvpn-devel X-Patchwork-Id: 1474 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id 4KfuEDVDbF9DGAAAIUCqbw (envelope-from ) for ; Thu, 24 Sep 2020 02:56:53 -0400 Received: from proxy3.mail.iad3b.rsapps.net ([172.31.255.6]) by director12.mail.ord1d.rsapps.net with LMTP id KDPBEDVDbF+qAwAAIasKDg (envelope-from ) for ; Thu, 24 Sep 2020 02:56:53 -0400 Received: from smtp35.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy3.mail.iad3b.rsapps.net with LMTPS id YLadCjVDbF+sXgAAM8Wetg (envelope-from ) for ; Thu, 24 Sep 2020 02:56:53 -0400 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: smtp35.gate.iad3b.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=pass header.d=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=rozman.si; dmarc=pass (p=none; dis=none) header.from=lists.sourceforge.net X-Suspicious-Flag: NO X-Classification-ID: 1fffc138-fe33-11ea-a273-525400503131-1-1 Received: from [216.105.38.7] ([216.105.38.7:59740] helo=lists.sourceforge.net) by smtp35.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 4C/C7-14981-4334C6F5; Thu, 24 Sep 2020 02:56:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:To:Sender:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cNDPHQFgXRa7i3aEUClLerroToetWopqpLWnge13iNI=; b=CxW6B7zt/lcZ/XVBtlEAZq6eD qHluFRz6XDRlUOKhff4420g4xrrWlJ248LOTIQWBXgOYTVkTUVTaBCmiU8LN9oxtUKdJSYXQ8VSeV +gAnscEYG+82joWPKb3CF7Wk/FnJCRXeOIMc7xz1H6JoeJjoxuccxOUnrf+vU7RFgo0lY=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kLLAT-00028s-6U; Thu, 24 Sep 2020 06:55:49 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLLAR-00028j-OP for openvpn-devel@lists.sourceforge.net; Thu, 24 Sep 2020 06:55:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=bRGhsNaFU0ZWVJPL+bVxaT1bhvVnCvrsITFj5AKgUWk=; b=CzZP2WLjIMlNynlmvT22MPikMG dLfreuS2QCCZhO9VA//3omwTfXhZALBFal/OWJtnMsmt0lAQnzxJnV1qANcog4MKzvDFHVHKzdmVt TENrmYiUyzmW5buwbqhaLpgN7La1lTPT2B09lZTDWJgD5jD0W3jXmm27ha0iKayg3BRk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bRGhsNaFU0ZWVJPL+bVxaT1bhvVnCvrsITFj5AKgUWk=; b=YUInYAYpP9Lfc8PDTOFh/uscta NXwMcQatWFZnO7W3I6GXUtpVB2OzTXggi9AkEuhJqaaPOXzhobH38d84pHUjJQc9BWOib/xJkD5y8 CrAdB7PbdcGModeBZHjLBxRADLxC8PNpeKaDb59z7jRLf9gzmHuVH809OzYORZDk5vQ4=; Received: from pub5.amebis.si ([213.250.55.21]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1kLLAN-005h5H-BS for openvpn-devel@lists.sourceforge.net; Thu, 24 Sep 2020 06:55:47 +0000 Received: by pub5.amebis.si (Postfix, from userid 1000) id 915131002B58; Thu, 24 Sep 2020 08:55:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rozman.si; s=default; t=1600930529; bh=bRGhsNaFU0ZWVJPL+bVxaT1bhvVnCvrsITFj5AKgUWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tA1PJVTZ4mMLWrsgImVfLVQPHtltZe7KfjouOUsLW5ZlgkssWGL5dsAB922i1yvaq UIG2PgqCzkql3QHEI/9PzOkFUn5Bv5DeobgHmQNAw3tZdjqg+G6oZjYzW8T4V4R/xE PQTGhytCEA2GB/oFCBd9V4TJyw/UvNYryMj+dqKg= X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on brana.amebis.doma X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Received: from SR6.amebis.doma (unknown [IPv6:2a00:ee2:209:164:8103:4a53:d5f0:1d48]) by pub5.amebis.si (Postfix) with ESMTP id F03F11002FA3; Thu, 24 Sep 2020 08:55:25 +0200 (CEST) To: openvpn-devel@lists.sourceforge.net Date: Thu, 24 Sep 2020 08:55:19 +0200 Message-Id: <20200924065519.1839-1-simon@rozman.si> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 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: rozman.si] -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: 1kLLAN-005h5H-BS Subject: [Openvpn-devel] [PATCH] openvpnmsica: Simplify find_adapters() to void return 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: , X-Patchwork-Original-From: Simon Rozman via Openvpn-devel From: Kristof Provost via Openvpn-devel Reply-To: Simon Rozman Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox As the find_adapters() failure is not critical and FindSystemInfo() should continue regardless, the find_adapters() has been simplified not to return result code. It still logs any error thou. Signed-off-by: Simon Rozman Acked-by: Lev Stipakov --- src/openvpnmsica/openvpnmsica.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c index f203f736..de1cf65c 100644 --- a/src/openvpnmsica/openvpnmsica.c +++ b/src/openvpnmsica/openvpnmsica.c @@ -248,7 +248,7 @@ cleanup_OpenSCManager: } -static UINT +static void find_adapters( _In_ MSIHANDLE hInstall, _In_z_ LPCTSTR szzHardwareIDs, @@ -262,12 +262,12 @@ find_adapters( uiResult = tap_list_adapters(NULL, szzHardwareIDs, &pAdapterList); if (uiResult != ERROR_SUCCESS) { - return uiResult; + return; } else if (pAdapterList == NULL) { /* No adapters - no fun. */ - return ERROR_SUCCESS; + return; } /* Get IPv4/v6 info for all network adapters. Actually, we're interested in link status only: up/down? */ @@ -394,7 +394,6 @@ cleanup_pAdapterAdresses: free(pAdapterAdresses); cleanup_pAdapterList: tap_free_adapter_list(pAdapterList); - return uiResult; }