You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.5 KiB
37 lines
1.5 KiB
5 years ago
|
From 42c7f7dfee122b9da446c0e985187e0dc66ecb09 Mon Sep 17 00:00:00 2001
|
||
|
From: Beniamino Galvani <bgalvani@redhat.com>
|
||
|
Date: Fri, 14 Jun 2019 16:31:53 +0200
|
||
|
Subject: [PATCH] libnm-core: fix conversion to json of team watcher flags
|
||
|
|
||
|
Team watcher flags are boolean objects: persist them as such and not
|
||
|
as strings.
|
||
|
|
||
|
Fixes: e59878ce1911f3930c60a104673b59fb3c5ae001
|
||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1720153
|
||
|
(cherry picked from commit 28c3692023fe65d5a6def93774ff1ac7f07e27f0)
|
||
|
---
|
||
|
libnm-core/nm-utils.c | 6 +++---
|
||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
|
||
|
index 394ca7c3a..6d8a0fe32 100644
|
||
|
--- a/libnm-core/nm-utils.c
|
||
|
+++ b/libnm-core/nm-utils.c
|
||
|
@@ -5786,11 +5786,11 @@ _nm_utils_team_link_watcher_to_json (NMTeamLinkWatcher *watcher)
|
||
|
|
||
|
flags = nm_team_link_watcher_get_flags (watcher);
|
||
|
if (flags & NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_VALIDATE_ACTIVE)
|
||
|
- json_object_set_new (json_element, "validate_active", json_string ("true"));
|
||
|
+ json_object_set_new (json_element, "validate_active", json_true ());
|
||
|
if (flags & NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_VALIDATE_INACTIVE)
|
||
|
- json_object_set_new (json_element, "validate_inactive", json_string ("true"));
|
||
|
+ json_object_set_new (json_element, "validate_inactive", json_true ());
|
||
|
if (flags & NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_SEND_ALWAYS)
|
||
|
- json_object_set_new (json_element, "send_always", json_string ("true"));
|
||
|
+ json_object_set_new (json_element, "send_always", json_true ());
|
||
|
|
||
|
return json_element;
|
||
|
|
||
|
--
|
||
|
2.20.1
|