[NetworkManager-openvpn/th/fix-detect-version: 2/3] service: log detected openvpn version
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [NetworkManager-openvpn/th/fix-detect-version: 2/3] service: log detected openvpn version
- Date: Mon, 7 Jun 2021 16:51:55 +0000 (UTC)
commit 59b797755d5e4108131cad32f28b54b80ed679c8
Author: Thomas Haller <thaller redhat com>
Date: Mon Jun 7 18:35:05 2021 +0200
service: log detected openvpn version
src/nm-openvpn-service.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 3aca146..e08976f 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -579,8 +579,23 @@ openvpn_binary_detect_version (const char *exepath)
static OpenvpnBinaryVersion
openvpn_binary_detect_version_cached (const char *exepath, OpenvpnBinaryVersion *cached)
{
- if (G_UNLIKELY (*cached == OPENVPN_BINARY_VERSION_INVALID))
+ if (G_UNLIKELY (*cached == OPENVPN_BINARY_VERSION_INVALID)) {
+ const char *str;
+
*cached = openvpn_binary_detect_version (exepath);
+ switch (*cached) {
+ case OPENVPN_BINARY_VERSION_2_3_OR_OLDER:
+ str = "2.3 or older";
+ break;
+ case OPENVPN_BINARY_VERSION_2_4_OR_NEWER:
+ str = "2.4 or newer";
+ break;
+ default:
+ str = "unknown";
+ break;
+ }
+ _LOGI ("detected openvpn version %s", str);
+ }
return *cached;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]