2008-10-06 Dan Williams <dcbw@redhat.com>
* src/nm-ip4-config.c src/nm-ip4-config.h - nm_ip4_config_is_exported -> nm_ip4_config_get_dbus_path * src/nm-device-interface.c - (nm_device_interface_init): make 'ip4-config' a boxed property of type DBUS_TYPE_G_OBJECT_PATH so that we can make it NULL when we need to by using '/' for the object path * src/nm-device.c - (src/nm-device.c): marshal missing/unexported ip4-config through dbus as '/' since dbus-glib can't handle NULL objects nor can dbus handle NULL object paths git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4152 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
16
ChangeLog
16
ChangeLog
@@ -1,3 +1,19 @@
|
|||||||
|
2008-10-06 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/nm-ip4-config.c
|
||||||
|
src/nm-ip4-config.h
|
||||||
|
- nm_ip4_config_is_exported -> nm_ip4_config_get_dbus_path
|
||||||
|
|
||||||
|
* src/nm-device-interface.c
|
||||||
|
- (nm_device_interface_init): make 'ip4-config' a boxed property of type
|
||||||
|
DBUS_TYPE_G_OBJECT_PATH so that we can make it NULL when we need to
|
||||||
|
by using '/' for the object path
|
||||||
|
|
||||||
|
* src/nm-device.c
|
||||||
|
- (src/nm-device.c): marshal missing/unexported ip4-config through
|
||||||
|
dbus as '/' since dbus-glib can't handle NULL objects nor can
|
||||||
|
dbus handle NULL object paths
|
||||||
|
|
||||||
2008-10-03 Alexander Sack <asac@ubuntu.com>
|
2008-10-03 Alexander Sack <asac@ubuntu.com>
|
||||||
|
|
||||||
Implement system hostname support for debian/ubuntu
|
Implement system hostname support for debian/ubuntu
|
||||||
|
@@ -90,10 +90,10 @@ nm_device_interface_init (gpointer g_iface)
|
|||||||
|
|
||||||
g_object_interface_install_property
|
g_object_interface_install_property
|
||||||
(g_iface,
|
(g_iface,
|
||||||
g_param_spec_object (NM_DEVICE_INTERFACE_IP4_CONFIG,
|
g_param_spec_boxed (NM_DEVICE_INTERFACE_IP4_CONFIG,
|
||||||
"IP4 Config",
|
"IP4 Config",
|
||||||
"IP4 Config",
|
"IP4 Config",
|
||||||
G_TYPE_OBJECT,
|
DBUS_TYPE_G_OBJECT_PATH,
|
||||||
G_PARAM_READWRITE));
|
G_PARAM_READWRITE));
|
||||||
|
|
||||||
g_object_interface_install_property
|
g_object_interface_install_property
|
||||||
|
@@ -1916,7 +1916,7 @@ nm_device_set_ip4_config (NMDevice *self, NMIP4Config *config, NMDeviceStateReas
|
|||||||
priv->ip4_config = g_object_ref (config);
|
priv->ip4_config = g_object_ref (config);
|
||||||
|
|
||||||
/* Export over D-Bus if needed */
|
/* Export over D-Bus if needed */
|
||||||
if (!nm_ip4_config_is_exported (config))
|
if (!nm_ip4_config_get_dbus_path (config))
|
||||||
nm_ip4_config_export (config);
|
nm_ip4_config_export (config);
|
||||||
|
|
||||||
success = nm_system_device_set_from_ip4_config (ip_iface, config, nm_device_get_priority (self));
|
success = nm_system_device_set_from_ip4_config (ip_iface, config, nm_device_get_priority (self));
|
||||||
@@ -2212,9 +2212,9 @@ get_property (GObject *object, guint prop_id,
|
|||||||
break;
|
break;
|
||||||
case NM_DEVICE_INTERFACE_PROP_IP4_CONFIG:
|
case NM_DEVICE_INTERFACE_PROP_IP4_CONFIG:
|
||||||
if ((state == NM_DEVICE_STATE_ACTIVATED) || (state == NM_DEVICE_STATE_IP_CONFIG))
|
if ((state == NM_DEVICE_STATE_ACTIVATED) || (state == NM_DEVICE_STATE_IP_CONFIG))
|
||||||
g_value_set_object (value, priv->ip4_config);
|
g_value_set_boxed (value, nm_ip4_config_get_dbus_path (priv->ip4_config));
|
||||||
else
|
else
|
||||||
g_value_set_object (value, NULL);
|
g_value_set_boxed (value, "/");
|
||||||
break;
|
break;
|
||||||
case NM_DEVICE_INTERFACE_PROP_DHCP4_CONFIG:
|
case NM_DEVICE_INTERFACE_PROP_DHCP4_CONFIG:
|
||||||
if ( ((state == NM_DEVICE_STATE_ACTIVATED) || (state == NM_DEVICE_STATE_IP_CONFIG))
|
if ( ((state == NM_DEVICE_STATE_ACTIVATED) || (state == NM_DEVICE_STATE_IP_CONFIG))
|
||||||
|
@@ -99,15 +99,12 @@ nm_ip4_config_export (NMIP4Config *config)
|
|||||||
g_object_unref (dbus_mgr);
|
g_object_unref (dbus_mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
const char *
|
||||||
nm_ip4_config_is_exported (NMIP4Config *config)
|
nm_ip4_config_get_dbus_path (NMIP4Config *config)
|
||||||
{
|
{
|
||||||
NMIP4ConfigPrivate *priv;
|
|
||||||
|
|
||||||
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), FALSE);
|
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), FALSE);
|
||||||
|
|
||||||
priv = NM_IP4_CONFIG_GET_PRIVATE (config);
|
return NM_IP4_CONFIG_GET_PRIVATE (config)->path;
|
||||||
return !!priv->path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -54,7 +54,7 @@ GType nm_ip4_config_get_type (void);
|
|||||||
|
|
||||||
NMIP4Config * nm_ip4_config_new (void);
|
NMIP4Config * nm_ip4_config_new (void);
|
||||||
void nm_ip4_config_export (NMIP4Config *config);
|
void nm_ip4_config_export (NMIP4Config *config);
|
||||||
gboolean nm_ip4_config_is_exported (NMIP4Config *config);
|
const char *nm_ip4_config_get_dbus_path (NMIP4Config *config);
|
||||||
|
|
||||||
void nm_ip4_config_take_address (NMIP4Config *config, NMSettingIP4Address *address);
|
void nm_ip4_config_take_address (NMIP4Config *config, NMSettingIP4Address *address);
|
||||||
void nm_ip4_config_add_address (NMIP4Config *config, NMSettingIP4Address *address);
|
void nm_ip4_config_add_address (NMIP4Config *config, NMSettingIP4Address *address);
|
||||||
|
Reference in New Issue
Block a user