mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 17:00:40 +01:00
2007-08-20 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c - (nm_manager_remove_device): bring device down before disconnecting signal handlers, so that the 'state' signal will get broadcast when the device enters the DOWN state - (manager_device_state_changed): add NM_DEVICE_STATE_DOWN to the list of states that cause the NMManager to recheck its state git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2720 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
f7ca6ded56
commit
e5177b35cd
2 changed files with 22 additions and 5 deletions
|
|
@ -1,3 +1,12 @@
|
|||
2007-08-20 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/nm-manager.c
|
||||
- (nm_manager_remove_device): bring device down before disconnecting
|
||||
signal handlers, so that the 'state' signal will get broadcast when
|
||||
the device enters the DOWN state
|
||||
- (manager_device_state_changed): add NM_DEVICE_STATE_DOWN to the list
|
||||
of states that cause the NMManager to recheck its state
|
||||
|
||||
2007-08-20 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/supplicant-manager/nm-supplicant-interface.c
|
||||
|
|
|
|||
|
|
@ -262,10 +262,17 @@ manager_device_state_changed (NMDevice *device, NMDeviceState state, gpointer us
|
|||
NMManager *manager = NM_MANAGER (user_data);
|
||||
|
||||
/* Only these state changes can modify the manager state */
|
||||
if (state == NM_DEVICE_STATE_ACTIVATED || state == NM_DEVICE_STATE_FAILED ||
|
||||
state == NM_DEVICE_STATE_CANCELLED || state == NM_DEVICE_STATE_DISCONNECTED)
|
||||
|
||||
manager_state_changed (manager);
|
||||
switch (state) {
|
||||
case NM_DEVICE_STATE_ACTIVATED:
|
||||
case NM_DEVICE_STATE_FAILED:
|
||||
case NM_DEVICE_STATE_CANCELLED:
|
||||
case NM_DEVICE_STATE_DOWN:
|
||||
case NM_DEVICE_STATE_DISCONNECTED:
|
||||
manager_state_changed (manager);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -315,9 +322,10 @@ nm_manager_remove_device (NMManager *manager, NMDevice *device)
|
|||
if (iter->data == device) {
|
||||
priv->devices = g_slist_delete_link (priv->devices, iter);
|
||||
|
||||
nm_device_bring_down (device, FALSE);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (device, manager_device_state_changed, manager);
|
||||
|
||||
nm_device_bring_down (device, FALSE);
|
||||
manager_device_removed (manager, device);
|
||||
g_object_unref (device);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue