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:
Dan Williams 2011-04-14 09:19:30 -05:00
parent dae8ab9be9
commit e116ee9d8a

View file

@ -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;
}
/* ---------------------------------------------------------------------------------------------------- */