2007-06-13 Tambet Ingo <tambet@ximian.com>
* src/nm-device.c (nm_device_state_changed): Emit the signal before handling it because the handling code will cause the next state change and signal listeners get the signals in wrong order. * src/NetworkManagerPolicy.c (nm_policy_device_change_check): Get the "old_dev" correctly in case of pending activation. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2593 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1521,6 +1521,8 @@ nm_device_state_changed (NMDevice *device, NMDeviceState state)
|
||||
old_state = device->priv->state;
|
||||
device->priv->state = state;
|
||||
|
||||
g_signal_emit_by_name (device, "state-changed", state);
|
||||
|
||||
switch (state) {
|
||||
case NM_DEVICE_STATE_DOWN:
|
||||
if (old_state == NM_DEVICE_STATE_ACTIVATED)
|
||||
@@ -1536,8 +1538,6 @@ nm_device_state_changed (NMDevice *device, NMDeviceState state)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_signal_emit_by_name (device, "state-changed", state);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user