summaryrefslogtreecommitdiff
path: root/src/nm-manager.c
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2015-08-25 13:32:53 +0200
committerJiří Klimeš <jklimes@redhat.com>2015-08-26 09:47:47 +0200
commit7edb53f66057a065e4699dcc317d13443a0e5540 (patch)
tree02e130e3ba287f3a01bd876194075a707ea9c6c5 /src/nm-manager.c
parent01580195fabbf59c903ffa9ba307820c62164db0 (diff)
downloadNetworkManager-7edb53f66057a065e4699dcc317d13443a0e5540.tar.gz
core: don't set "startup complete" until devices have been added (rh #1256772)
check_if_startup_complete() could be invoked from nm_settings_start() before devices had chance to be added, which results in premature "startup complete" and NM would quit when configure-and-quit=yes is set up. Postpone actual check_if_startup_complete() resolution until we add all devices and they are processed. (gdb) bt #0 0x00005555556401f3 in check_if_startup_complete (self=0x5555559f91d0) at nm-manager.c:719 #1 0x00007ffff4d69de8 in g_closure_invoke () at /lib64/libgobject-2.0.so.0 #2 0x00007ffff4d7b70d in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0 #3 0x00007ffff4d83471 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0 #4 0x00007ffff4d8372f in g_signal_emit () at /lib64/libgobject-2.0.so.0 #5 0x00007ffff4d6e4b5 in g_object_dispatch_properties_changed () at /lib64/libgobject-2.0.so.0 #6 0x00007ffff4d709d9 in g_object_notify () at /lib64/libgobject-2.0.so.0 #7 0x00005555556e232c in check_startup_complete (self=self@entry=0x555555a0e130) at settings/nm-settings.c:204 #8 0x00005555556e5203 in nm_settings_start (self=0x555555a0e130, error=error@entry=0x7fffffffe658) at settings/nm-settings.c:2122 #9 0x0000555555646d06 in nm_manager_start (self=0x5555559f91d0, error=0x7fffffffe658) at nm-manager.c:4153 #10 0x00005555555add43 in main (argc=1, argv=0x7fffffffe7c8) at main.c:428 (gdb) Fixes:Beaker:NetworkManager_Test37_run_once_new_connection https://bugzilla.redhat.com/show_bug.cgi?id=1256772
Diffstat (limited to 'src/nm-manager.c')
-rw-r--r--src/nm-manager.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 5744a8cdc9..71b9d7074f 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -138,6 +138,7 @@ typedef struct {
guint timestamp_update_id;
gboolean startup;
+ gboolean devices_inited;
} NMManagerPrivate;
#define NM_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_MANAGER, NMManagerPrivate))
@@ -687,6 +688,9 @@ check_if_startup_complete (NMManager *self)
if (!priv->startup)
return;
+ if (!priv->devices_inited)
+ return;
+
if (!nm_settings_get_startup_complete (priv->settings)) {
nm_log_dbg (LOGD_CORE, "check_if_startup_complete returns FALSE because of NMSettings");
return;
@@ -4201,6 +4205,8 @@ nm_manager_start (NMManager *self, GError **error)
*/
system_create_virtual_devices (self);
+ priv->devices_inited = TRUE;
+
check_if_startup_complete (self);
return TRUE;