2005-03-22 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c - (nm_wired_link_activated): actually ignore netlink events from wireless devices. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@503 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -572,17 +572,21 @@ nm_wired_link_activated (NmNetlinkMonitor *monitor,
|
|||||||
const gchar *interface_name,
|
const gchar *interface_name,
|
||||||
NMData *data)
|
NMData *data)
|
||||||
{
|
{
|
||||||
NMDevice *device;
|
|
||||||
|
|
||||||
if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
|
if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
|
||||||
{
|
{
|
||||||
device = nm_get_device_by_iface (data, interface_name);
|
NMDevice *dev = nm_get_device_by_iface (data, interface_name);
|
||||||
|
|
||||||
if (device != NULL)
|
/* Don't do anything if we already have a link */
|
||||||
|
if ( (dev != NULL)
|
||||||
|
&& nm_device_is_wired (dev)
|
||||||
|
&& !nm_device_has_active_link (dev))
|
||||||
{
|
{
|
||||||
nm_device_set_link_active (device, TRUE);
|
nm_device_set_link_active (dev, TRUE);
|
||||||
|
|
||||||
if (nm_device_has_active_link (device)
|
/* If a network cable just got plugged in, force-switch from a wireless
|
||||||
|
* to a wired connection.
|
||||||
|
*/
|
||||||
|
if (nm_device_has_active_link (dev)
|
||||||
&& data->active_device
|
&& data->active_device
|
||||||
&& data->active_device_locked
|
&& data->active_device_locked
|
||||||
&& nm_device_is_wireless (data->active_device))
|
&& nm_device_is_wireless (data->active_device))
|
||||||
|
@@ -424,7 +424,7 @@ void nm_policy_schedule_state_update (NMData *app_data)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* nm_policy_schedule_state_update
|
* nm_policy_schedule_device_switch
|
||||||
*
|
*
|
||||||
* Queue up an idle handler to deal with state changes when we want
|
* Queue up an idle handler to deal with state changes when we want
|
||||||
* to force a particular device to be the active device.
|
* to force a particular device to be the active device.
|
||||||
|
Reference in New Issue
Block a user