Fix loglevel (upstream bug #401)

f38
David Woodhouse 3 years ago
parent 414588b865
commit 0f49f866c6

@ -0,0 +1,36 @@
From a061a8e9adcda6c3a6ae39a82f87da13fc9ee207 Mon Sep 17 00:00:00 2001
From: Maxim Storchak <m.storchak@gmail.com>
Date: Tue, 5 Apr 2022 13:23:06 +0300
Subject: [PATCH] Set loglevel as soon as it's known
Fixes #401
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
---
main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/main.c b/main.c
index 166121f2..f382069e 100644
--- a/main.c
+++ b/main.c
@@ -2155,6 +2155,8 @@ int main(int argc, char **argv)
if (vpninfo->dump_http_traffic && verbose < PRG_DEBUG)
verbose = PRG_DEBUG;
+ openconnect_set_loglevel(vpninfo, verbose);
+
if (autoproxy) {
#ifdef LIBPROXY_HDR
vpninfo->proxy_factory = px_proxy_factory_new();
@@ -2291,7 +2293,6 @@ int main(int argc, char **argv)
}
- openconnect_set_loglevel(vpninfo, verbose);
openconnect_set_setup_tun_handler(vpninfo, fully_up_cb);
openconnect_set_stats_handler(vpninfo, print_connection_stats);
--
2.25.1

@ -40,7 +40,7 @@
Name: openconnect
Version: 8.20
Release: 1%{?relsuffix}%{?dist}
Release: 2%{?relsuffix}%{?dist}
Summary: Open client for Cisco AnyConnect VPN, Juniper Network Connect/Pulse, PAN GlobalProtect
License: LGPLv2+
@ -52,6 +52,8 @@ Source1: ftp://ftp.infradead.org/pub/openconnect/openconnect-%{version}%{?gitsuf
Source2: gpgkey-BE07D9FD54809AB2C4B0FF5F63762CDA67E2F359.asc
Source3: macros.gpg
Patch0001: 0001-Set-loglevel-as-soon-as-it-s-known.patch
BuildRequires: make
BuildRequires: pkgconfig(libxml-2.0) pkgconfig(libpcsclite) krb5-devel gnupg2
BuildRequires: autoconf automake libtool gettext pkgconfig(liblz4)
@ -161,6 +163,9 @@ make VERBOSE=1 check
%{_libdir}/pkgconfig/openconnect.pc
%changelog
* Tue Apr 19 2022 David Woodhouse <dwmw2@infradead.org> - 8.20-2
- Merge upstream patch to fix loglevel (OC #401).
* Sun Feb 20 2022 David Woodhouse <dwmw2@infradead.org> - 8.20-1
- Update to 8.20 release

Loading…
Cancel
Save