main: (order) call g_type_init() very early in main()

g_type_init() is independent of all NetworkManager
functionality. Just get it done early on.
This commit is contained in:
Thomas Haller
2015-03-13 19:42:21 +01:00
parent 12ad2c7fe7
commit 0587dbe96c
2 changed files with 8 additions and 8 deletions

View File

@@ -259,6 +259,10 @@ main (int argc, char *argv[])
char *bad_domains = NULL;
NMConfigCmdLineOptions *config_cli;
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
#endif
_nm_utils_is_manager_process = TRUE;
main_loop = g_main_loop_new (NULL, FALSE);
@@ -388,10 +392,6 @@ main (int argc, char *argv[])
nm_logging_syslog_openlog (global_opt.debug);
#if !GLIB_CHECK_VERSION (2, 35, 0)
g_type_init ();
#endif
dbus_threads_init_default ();
/* Ensure that non-exported properties don't leak out, and that the