From bfe522304da217296e2a61040f58e35ec5d6f3f2 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 16 Aug 2021 09:51:46 +0200 Subject: New upstream version 1.30.6 --- libnm/nm-device.c | 4 ++-- libnm/nm-property-infos-ifcfg-rh.xml | 10 ++++++++-- libnm/nm-settings-docs-gir.xml | 4 ++-- libnm/nm-vpn-plugin-old.c | 15 +++++++-------- libnm/nm-vpn-service-plugin.c | 20 ++++++-------------- 5 files changed, 25 insertions(+), 28 deletions(-) (limited to 'libnm') diff --git a/libnm/nm-device.c b/libnm/nm-device.c index 9cb88dae..e9e8fecc 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -1386,7 +1386,7 @@ nm_device_get_autoconnect(NMDevice *device) * Enables or disables automatic activation of the #NMDevice. * * Deprecated: 1.22: Use the async command nm_client_dbus_set_property() on - * nm_object_get_path(), %NM_DBUS_INTERFACE_DEVICE to set "AutoConnect" property to a "(b)" value. + * nm_object_get_path(), %NM_DBUS_INTERFACE_DEVICE to set "Autoconnect" property to a "(b)" value. * This function is deprecated because it calls a synchronous D-Bus method * and modifies the content of the NMClient cache client side. **/ @@ -1400,7 +1400,7 @@ nm_device_set_autoconnect(NMDevice *device, gboolean autoconnect) _nm_client_set_property_sync_legacy(_nm_object_get_client(device), _nm_object_get_path(device), NM_DBUS_INTERFACE_DEVICE, - "AutoConnect", + "Autoconnect", "b", autoconnect); } diff --git a/libnm/nm-property-infos-ifcfg-rh.xml b/libnm/nm-property-infos-ifcfg-rh.xml index 1c6aced2..454cf1ef 100644 --- a/libnm/nm-property-infos-ifcfg-rh.xml +++ b/libnm/nm-property-infos-ifcfg-rh.xml @@ -309,8 +309,14 @@ proxy configuration, or set the PAC file via PAC_URL or PAC_SCRIPT."/> - - + + diff --git a/libnm/nm-settings-docs-gir.xml b/libnm/nm-settings-docs-gir.xml index f71d2bad..5089fb9e 100644 --- a/libnm/nm-settings-docs-gir.xml +++ b/libnm/nm-settings-docs-gir.xml @@ -362,8 +362,8 @@ - - + + diff --git a/libnm/nm-vpn-plugin-old.c b/libnm/nm-vpn-plugin-old.c index f45d0c09..33656026 100644 --- a/libnm/nm-vpn-plugin-old.c +++ b/libnm/nm-vpn-plugin-old.c @@ -420,12 +420,12 @@ _connect_generic(NMVpnPluginOld * plugin, GVariant * properties, GVariant * details) { - NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); - NMVpnPluginOldClass * vpn_class = NM_VPN_PLUGIN_OLD_GET_CLASS(plugin); - NMConnection * connection; - gboolean success = FALSE; - GError * error = NULL; - guint fail_stop_timeout = 0; + NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); + NMVpnPluginOldClass * vpn_class = NM_VPN_PLUGIN_OLD_GET_CLASS(plugin); + gs_unref_object NMConnection *connection = NULL; + gboolean success = FALSE; + GError * error = NULL; + guint fail_stop_timeout = 0; if (priv->state != NM_VPN_SERVICE_STATE_STOPPED && priv->state != NM_VPN_SERVICE_STATE_INIT) { g_dbus_method_invocation_return_error(context, @@ -445,6 +445,7 @@ _connect_generic(NMVpnPluginOld * plugin, "Invalid connection: %s", error->message); g_clear_error(&error); + return; } priv->interactive = FALSE; @@ -485,8 +486,6 @@ _connect_generic(NMVpnPluginOld * plugin, */ schedule_fail_stop(plugin, fail_stop_timeout); } - - g_object_unref(connection); } static void diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c index 34de21b8..bf5f292f 100644 --- a/libnm/nm-vpn-service-plugin.c +++ b/libnm/nm-vpn-service-plugin.c @@ -755,11 +755,11 @@ nm_vpn_service_plugin_read_vpn_details(int fd, GHashTable **out_data, GHashTable gs_unref_hashtable GHashTable *secrets = NULL; gboolean success = FALSE; GHashTable * hash = NULL; - GString * key = NULL, *val = NULL; - nm_auto_free_gstring GString *line = NULL; + nm_auto_free_gstring GString *key = NULL; + nm_auto_free_gstring GString *val = NULL; + nm_auto_free_gstring GString *line = NULL; char c; - - GString *str = NULL; + GString * str = NULL; if (out_data) g_return_val_if_fail(*out_data == NULL, FALSE); @@ -807,16 +807,12 @@ nm_vpn_service_plugin_read_vpn_details(int fd, GHashTable **out_data, GHashTable /* finish marker */ break; } else if (strncmp(line->str, DATA_KEY_TAG, strlen(DATA_KEY_TAG)) == 0) { - if (key != NULL) { + if (nm_clear_g_string(&key)) g_warning("a value expected"); - g_string_free(key, TRUE); - } key = g_string_new(line->str + strlen(DATA_KEY_TAG)); str = key; hash = data; } else if (strncmp(line->str, DATA_VAL_TAG, strlen(DATA_VAL_TAG)) == 0) { - if (val != NULL) - g_string_free(val, TRUE); if (val || !key || hash != data) { g_warning("%s not preceded by %s", DATA_VAL_TAG, DATA_KEY_TAG); break; @@ -824,16 +820,12 @@ nm_vpn_service_plugin_read_vpn_details(int fd, GHashTable **out_data, GHashTable val = g_string_new(line->str + strlen(DATA_VAL_TAG)); str = val; } else if (strncmp(line->str, SECRET_KEY_TAG, strlen(SECRET_KEY_TAG)) == 0) { - if (key != NULL) { + if (nm_clear_g_string(&key)) g_warning("a value expected"); - g_string_free(key, TRUE); - } key = g_string_new(line->str + strlen(SECRET_KEY_TAG)); str = key; hash = secrets; } else if (strncmp(line->str, SECRET_VAL_TAG, strlen(SECRET_VAL_TAG)) == 0) { - if (val != NULL) - g_string_free(val, TRUE); if (val || !key || hash != secrets) { g_warning("%s not preceded by %s", SECRET_VAL_TAG, SECRET_KEY_TAG); break; -- cgit 1.3.0-6-gf8a5