mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 23:20:34 +01:00
core: don't keep re-reading the ConsoleKit database
Due to a stupid error the cache wasn't actually getting used and way more than one SessionMonitor was getting created.
This commit is contained in:
parent
dae8ab9be9
commit
e116ee9d8a
1 changed files with 3 additions and 2 deletions
|
|
@ -410,9 +410,10 @@ nm_session_monitor_get (void)
|
|||
static NMSessionMonitor *singleton = NULL;
|
||||
|
||||
if (singleton)
|
||||
return NM_SESSION_MONITOR (g_object_ref (singleton));
|
||||
return g_object_ref (singleton);
|
||||
|
||||
return NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
|
||||
singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
|
||||
return singleton;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue