2008-09-04 Dan Williams <dcbw@redhat.com>
* src/nm-ip4-config.c src/nm-ip4-config.h - (nm_ip4_config_new): don't export over D-Bus here - (nm_ip4_config_export): new function; export the config over D-Bus - (nm_ip4_config_is_exported): new function * src/nm-device.c - (nm_device_activate_stage5_ip_config_commit): fix leak of IP4Config objects by balancing the IP4Config constructor; the device holds a reference to the IP4Config already - (nm_device_set_ip4_config): export the IP4Config when needed git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4037 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1392,6 +1392,10 @@ nm_device_activate_stage5_ip_config_commit (gpointer user_data)
|
||||
out:
|
||||
nm_info ("Activation (%s) Stage 5 of 5 (IP Configure Commit) complete.",
|
||||
iface);
|
||||
|
||||
/* Balance IP4Config creation; device takes ownership in set_ip4_config() */
|
||||
g_object_unref (ip4_config);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1889,6 +1893,10 @@ nm_device_set_ip4_config (NMDevice *self, NMIP4Config *config, NMDeviceStateReas
|
||||
|
||||
priv->ip4_config = g_object_ref (config);
|
||||
|
||||
/* Export over D-Bus if needed */
|
||||
if (!nm_ip4_config_is_exported (config))
|
||||
nm_ip4_config_export (config);
|
||||
|
||||
success = nm_system_device_set_from_ip4_config (ip_iface, config);
|
||||
if (success)
|
||||
nm_device_update_ip4_address (self);
|
||||
|
Reference in New Issue
Block a user