main: don't initialize the session monitor

The session monitor will be initialized as soon as it's needed.

Acked-By: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Pavel Šimerda 2014-12-27 01:29:34 +01:00
parent 4a9eaa190f
commit eb2eda4408

View file

@ -211,7 +211,6 @@ main (int argc, char *argv[])
gs_unref_object NMFirewallManager *fw_mgr = NULL;
gs_unref_object NMSettings *settings = NULL;
gs_unref_object NMConfig *config = NULL;
gs_unref_object NMSessionMonitor *session_monitor = NULL;
GError *error = NULL;
gboolean wrote_pidfile = FALSE;
char *bad_domains = NULL;
@ -440,10 +439,6 @@ main (int argc, char *argv[])
fw_mgr = nm_firewall_manager_get ();
g_assert (fw_mgr != NULL);
/* Initialize session monitor */
session_monitor = nm_session_monitor_get ();
g_assert (session_monitor != NULL);
if (!nm_dbus_manager_get_connection (dbus_mgr)) {
#if HAVE_DBUS_GLIB_100
nm_log_warn (LOGD_CORE, "Failed to connect to D-Bus; only private bus is available");