2007-08-12 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c - (nm_policy_device_change_check): fix policy to deactivate old device before activating new one, at least until the multiple active device support lands git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2668 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2007-08-12 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/NetworkManagerPolicy.c
|
||||||
|
- (nm_policy_device_change_check): fix policy to deactivate old device
|
||||||
|
before activating new one, at least until the multiple active
|
||||||
|
device support lands
|
||||||
|
|
||||||
2007-08-12 Dan Williams <dcbw@redhat.com>
|
2007-08-12 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* src/NetworkManagerPolicy.c
|
* src/NetworkManagerPolicy.c
|
||||||
|
@@ -290,7 +290,6 @@ nm_policy_device_change_check (gpointer user_data)
|
|||||||
} else if (old_dev && !new_dev) {
|
} else if (old_dev && !new_dev) {
|
||||||
/* Terminate current connection */
|
/* Terminate current connection */
|
||||||
nm_info ("SWITCH: terminating current connection '%s' because it's no longer valid.", nm_device_get_iface (old_dev));
|
nm_info ("SWITCH: terminating current connection '%s' because it's no longer valid.", nm_device_get_iface (old_dev));
|
||||||
nm_device_interface_deactivate (NM_DEVICE_INTERFACE (old_dev));
|
|
||||||
do_switch = TRUE;
|
do_switch = TRUE;
|
||||||
} else if (old_dev && new_dev) {
|
} else if (old_dev && new_dev) {
|
||||||
NMActRequest * old_act_req = nm_device_get_act_request (old_dev);
|
NMActRequest * old_act_req = nm_device_get_act_request (old_dev);
|
||||||
@@ -359,13 +358,19 @@ nm_policy_device_change_check (gpointer user_data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_switch && new_dev) {
|
if (do_switch) {
|
||||||
NMConnection *connection;
|
if (old_dev) {
|
||||||
|
nm_device_interface_deactivate (NM_DEVICE_INTERFACE (old_dev));
|
||||||
|
}
|
||||||
|
|
||||||
connection = create_connection (new_dev, ap);
|
if (new_dev) {
|
||||||
if (connection)
|
NMConnection *connection;
|
||||||
nm_device_interface_activate (NM_DEVICE_INTERFACE (new_dev),
|
|
||||||
connection, FALSE);
|
connection = create_connection (new_dev, ap);
|
||||||
|
if (connection)
|
||||||
|
nm_device_interface_activate (NM_DEVICE_INTERFACE (new_dev),
|
||||||
|
connection, FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ap)
|
if (ap)
|
||||||
|
Reference in New Issue
Block a user