mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 12:00:36 +01:00
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:
parent
12ad2c7fe7
commit
0587dbe96c
2 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -311,6 +311,10 @@ do_early_setup (int *argc, char **argv[])
|
|||
{NULL}
|
||||
};
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 35, 0)
|
||||
g_type_init ();
|
||||
#endif
|
||||
|
||||
setpgid (getpid (), getpid ());
|
||||
|
||||
if (!nm_main_utils_early_setup ("nm-iface-helper",
|
||||
|
|
@ -408,10 +412,6 @@ main (int argc, char *argv[])
|
|||
|
||||
nm_logging_syslog_openlog (global_opt.debug);
|
||||
|
||||
#if !GLIB_CHECK_VERSION (2, 35, 0)
|
||||
g_type_init ();
|
||||
#endif
|
||||
|
||||
nm_log_info (LOGD_CORE, "nm-iface-helper (version " NM_DIST_VERSION ") is starting...");
|
||||
|
||||
/* Set up platform interaction layer */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue