Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
NetworkManager
NetworkManager
Commits
f1d4af69
Commit
f1d4af69
authored
Oct 27, 2010
by
Dan Williams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
settings: make sure we get our D-Bus connection before using it
parent
84def2fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
src/system-settings/nm-sysconfig-settings.c
src/system-settings/nm-sysconfig-settings.c
+6
-8
No files found.
src/system-settings/nm-sysconfig-settings.c
View file @
f1d4af69
...
...
@@ -99,8 +99,8 @@ static void impl_settings_save_hostname (NMSysconfigSettings *self,
static
void
unmanaged_specs_changed
(
NMSystemConfigInterface
*
config
,
gpointer
user_data
);
typedef
struct
{
NMDBusManager
*
dbus_mgr
;
DBusGConnection
*
bus
;
gboolean
exported
;
PolkitAuthority
*
authority
;
guint
auth_changed_id
;
...
...
@@ -1308,8 +1308,6 @@ nm_sysconfig_settings_new (const char *config_file,
{
NMSysconfigSettings
*
self
;
NMSysconfigSettingsPrivate
*
priv
;
NMDBusManager
*
dbus_mgr
;
DBusGConnection
*
bus
;
self
=
g_object_new
(
NM_TYPE_SYSCONFIG_SETTINGS
,
NULL
);
...
...
@@ -1319,6 +1317,8 @@ nm_sysconfig_settings_new (const char *config_file,
priv
=
NM_SYSCONFIG_SETTINGS_GET_PRIVATE
(
self
);
priv
->
config_file
=
g_strdup
(
config_file
);
priv
->
dbus_mgr
=
nm_dbus_manager_get
();
priv
->
bus
=
nm_dbus_manager_get_connection
(
priv
->
dbus_mgr
);
if
(
plugins
)
{
/* Load the plugins; fail if a plugin is not found. */
...
...
@@ -1329,11 +1329,7 @@ nm_sysconfig_settings_new (const char *config_file,
unmanaged_specs_changed
(
NULL
,
self
);
}
dbus_mgr
=
nm_dbus_manager_get
();
bus
=
nm_dbus_manager_get_connection
(
dbus_mgr
);
dbus_g_connection_register_g_object
(
bus
,
NM_DBUS_PATH_SETTINGS
,
G_OBJECT
(
self
));
g_object_unref
(
dbus_mgr
);
dbus_g_connection_register_g_object
(
priv
->
bus
,
NM_DBUS_PATH_SETTINGS
,
G_OBJECT
(
self
));
return
self
;
}
...
...
@@ -1359,6 +1355,8 @@ dispose (GObject *object)
g_slist_free
(
priv
->
pk_calls
);
priv
->
pk_calls
=
NULL
;
g_object_unref
(
priv
->
dbus_mgr
);
G_OBJECT_CLASS
(
nm_sysconfig_settings_parent_class
)
->
dispose
(
object
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment