summaryrefslogtreecommitdiff
path: root/libnm-core/nm-setting-team-port.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-09-23 10:30:50 +0200
committerThomas Haller <thaller@redhat.com>2016-09-27 10:56:42 +0200
commit32f78ae6c3baea7f2a90664fc676e73b236a4372 (patch)
tree1f40650d5940d0b268f58ab4abc644a59c70fe84 /libnm-core/nm-setting-team-port.c
parentc3586ce01a5b73005f9b003fb8f342b89e4f4a5d (diff)
downloadNetworkManager-32f78ae6c3baea7f2a90664fc676e73b236a4372.tar.gz
libnm: expose nm_utils_is_json_object() utility function
Since we possibly already link against libjansson, we can also expose some helper utils which allows nmcli to do basic validation of JSON without requiring to duplicate the effort of using libjansson. Also, tighten up the cecks to ensure that we have a JSON object at hand. We are really interested in that and not of arrays or literals.
Diffstat (limited to 'libnm-core/nm-setting-team-port.c')
-rw-r--r--libnm-core/nm-setting-team-port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-team-port.c b/libnm-core/nm-setting-team-port.c
index e3ddbdad7c..649d958273 100644
--- a/libnm-core/nm-setting-team-port.c
+++ b/libnm-core/nm-setting-team-port.c
@@ -117,7 +117,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
}
if (priv->config) {
- if (!_nm_utils_check_valid_json (priv->config, error)) {
+ if (!nm_utils_is_json_object (priv->config, error)) {
g_prefix_error (error,
"%s.%s: ",
NM_SETTING_TEAM_PORT_SETTING_NAME,