[network-manager-openvpn] properties: fix parsing remotes when checking gateway entry
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn] properties: fix parsing remotes when checking gateway entry
- Date: Tue, 9 Jan 2018 10:34:00 +0000 (UTC)
commit 74e2f1f789a8bc0dfd43f51a3d8301cbda597947
Author: Thomas Haller <thaller redhat com>
Date: Mon Jan 8 21:37:48 2018 +0100
properties: fix parsing remotes when checking gateway entry
Otherwise, ",," appears to be a valid remoted.
Fixes: 3c5c7efba75ffd121be3b0ac179c36ca9aa772b0
https://bugzilla.gnome.org/show_bug.cgi?id=792252
properties/nm-openvpn-editor.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/properties/nm-openvpn-editor.c b/properties/nm-openvpn-editor.c
index bd0aadc..f8e0277 100644
--- a/properties/nm-openvpn-editor.c
+++ b/properties/nm-openvpn-editor.c
@@ -2145,13 +2145,14 @@ check_gateway_entry (const char *str)
str_clone = g_strdup (str);
str_iter = str_clone;
while ((tok = strsep (&str_iter, " \t,"))) {
- if ( tok[0]
- && (nmovpn_remote_parse (tok,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL) != -1))
+ if (!tok[0])
+ continue;
+ if (nmovpn_remote_parse (tok,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL) != -1)
return FALSE;
success = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]