2007-10-06 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c - (connection_removed): deactivate removed connections git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2941 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2007-10-06 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/NetworkManagerPolicy.c
|
||||
- (connection_removed): deactivate removed connections
|
||||
|
||||
2007-10-06 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* libnm-util/nm-connection.c
|
||||
|
@@ -491,6 +491,21 @@ connection_removed (NMManager *manager,
|
||||
gpointer user_data)
|
||||
{
|
||||
NMPolicy *policy = (NMPolicy *) user_data;
|
||||
GSList *iter;
|
||||
|
||||
/* If the connection just removed was active, deactive it */
|
||||
for (iter = nm_manager_get_devices (manager); iter; iter = g_slist_next (iter)) {
|
||||
NMDevice *device = (NMDevice *) iter->data;
|
||||
NMActRequest *req = nm_device_get_act_request (device);
|
||||
NMConnection *dev_connection;
|
||||
|
||||
if (!req)
|
||||
continue;
|
||||
|
||||
dev_connection = nm_act_request_get_connection (req);
|
||||
if (dev_connection == connection)
|
||||
nm_device_interface_deactivate (NM_DEVICE_INTERFACE (device));
|
||||
}
|
||||
|
||||
schedule_change_check (policy);
|
||||
}
|
||||
|
Reference in New Issue
Block a user