diff options
| author | Michael Biebl <biebl@debian.org> | 2019-04-21 21:10:42 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-04-21 21:10:42 +0200 |
| commit | 1761e93f84aba1f3a2f0ebc3d753303f27395fed (patch) | |
| tree | 2a0aa70159a57641294d4aee7aee061bc25c0a7b /src/settings/nm-settings.c | |
| parent | 6cbf8459e4602877369dbf20c6597708725758c6 (diff) | |
| parent | 85563b7fc7ec2cd21e38debb9b28db342e2e8e7c (diff) | |
Update upstream source from tag 'upstream/1.18.0'
Update to upstream version '1.18.0' with Debian dir c79ce54aa2bd35bd9bd13eb01cf8687eaae2c0c1
Diffstat (limited to 'src/settings/nm-settings.c')
| -rw-r--r-- | src/settings/nm-settings.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index fd1d316a..8e18a33e 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -36,7 +36,7 @@ #include <selinux/selinux.h> #endif -#include "nm-common-macros.h" +#include "nm-libnm-core-intern/nm-common-macros.h" #include "nm-dbus-interface.h" #include "nm-connection.h" #include "nm-setting-8021x.h" @@ -60,7 +60,7 @@ #include "nm-utils.h" #include "nm-core-internal.h" -#include "nm-utils/nm-c-list.h" +#include "nm-glib-aux/nm-c-list.h" #include "nm-dbus-object.h" #include "devices/nm-device-ethernet.h" #include "nm-settings-connection.h" @@ -1138,7 +1138,7 @@ pk_add_cb (NMAuthChain *chain, NMAuthCallResult result; GError *error = NULL; NMConnection *connection = NULL; - NMSettingsConnection *added = NULL; + gs_unref_object NMSettingsConnection *added = NULL; NMSettingsAddCallback callback; gpointer callback_data; NMAuthSubject *subject; @@ -1169,6 +1169,12 @@ pk_add_cb (NMAuthChain *chain, save_to_disk = GPOINTER_TO_UINT (nm_auth_chain_get_data (chain, "save-to-disk")); added = nm_settings_add_connection (self, connection, save_to_disk, &error); + + /* The callback may remove the connection from the settings manager (e.g. + * because it's found to be incompatible with the device on AddAndActivate). + * But we need to keep it alive for a bit longer, precisely to check wehther + * it's still known to the setting manager. */ + g_object_ref (added); } callback = nm_auth_chain_get_data (chain, "callback"); |