2004-07-06 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c - Add IPv4 address update for active device during link state check - Don't allow wireless cards to be powered up when they are not the active device * src/NetworkManagerDbus.c src/NetworkManagerDbus.h - Add DBUS IPv4 address change signal - Add DBUS IPv4 address get method for devices * src/NetworkManagerDevice.c - Make setting the WEP key actually work - Move IP address get/set/update stuff here, per-device - Power down/bring down wireless device when deactivated - For scanning wireless devices, if first scan returned ENODATA, try again * src/NetworkManagerPolicy.c - Only set the WEP key for an allowed access point if there is one. We were setting it to be blank if one wasn't specified. * src/NetworkManagerUtils.h src/NetworkManagerUtils.c - Move the IP address stuff to NetworkManagerDevice.c * dispatcher-daemon/NetworkManagerDispatcher.c - Add device IPv4 address change notification stuff git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@13 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -100,11 +100,10 @@ NMDevice * nm_create_device_and_add_to_list (NMData *data, const char *udi)
|
||||
/* Initialize and bring up all new devices */
|
||||
if (nm_device_get_iface_type (dev) == NM_IFACE_TYPE_WIRELESS_ETHERNET)
|
||||
{
|
||||
/* Disable WEP */
|
||||
/* Disable WEP, take device down */
|
||||
nm_device_bring_down (dev);
|
||||
nm_device_set_wep_key (dev, NULL);
|
||||
nm_device_set_essid (dev, NULL);
|
||||
nm_device_bring_up (dev);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -334,19 +333,31 @@ gboolean nm_link_state_monitor (gpointer user_data)
|
||||
|
||||
if (dev)
|
||||
{
|
||||
/* Make sure the device is up first. It doesn't have to have
|
||||
* an IP address or anything, but most devices cannot do link
|
||||
* detection when they are down.
|
||||
*/
|
||||
if (!nm_device_is_up (dev))
|
||||
nm_device_bring_up (dev);
|
||||
if ( dev != data->active_device
|
||||
&& (nm_device_get_iface_type (dev) == NM_IFACE_TYPE_WIRELESS_ETHERNET))
|
||||
{
|
||||
/* If its a wireless card, make sure its down. Saves power. */
|
||||
if (nm_device_is_up (dev))
|
||||
nm_device_bring_down (dev);
|
||||
}
|
||||
|
||||
nm_device_update_link_active (dev, FALSE);
|
||||
if ((nm_device_get_iface_type (dev) == NM_IFACE_TYPE_WIRED_ETHERNET))
|
||||
{
|
||||
/* Make sure the device is up first. It doesn't have to have
|
||||
* an IP address or anything, but most wired devices cannot do link
|
||||
* detection when they are down.
|
||||
*/
|
||||
if (!nm_device_is_up (dev))
|
||||
nm_device_bring_up (dev);
|
||||
|
||||
nm_device_update_link_active (dev, FALSE);
|
||||
}
|
||||
|
||||
/* Check if the device's IP address has changed
|
||||
* (ie dhcp lease renew/address change)
|
||||
*/
|
||||
/* Implement me */
|
||||
if (dev == data->active_device)
|
||||
nm_device_update_ip4_address (dev);
|
||||
}
|
||||
|
||||
element = g_slist_next (element);
|
||||
|
Reference in New Issue
Block a user