2008-05-22 Tambet Ingo <tambet@gmail.com>

* src/nm-gsm-device.c (device_state_changed): Make sure we don't leave the
	serial device open when we're not connecting or connected.

	* src/nm-cdma-device.c (device_state_changed): Ditto.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3679 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Tambet Ingo 2008-05-22 12:36:07 +00:00
parent 83f1d81297
commit a8096e1ab3
3 changed files with 33 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2008-05-22 Tambet Ingo <tambet@gmail.com>
* src/nm-gsm-device.c (device_state_changed): Make sure we don't leave the
serial device open when we're not connecting or connected.
* src/nm-cdma-device.c (device_state_changed): Ditto.
2008-05-20 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/reader.c

View file

@ -385,6 +385,19 @@ device_state_changed (NMDeviceInterface *device, NMDeviceState state, gpointer u
*/
if (state == NM_DEVICE_STATE_UNAVAILABLE)
priv->state_to_disconnected_id = g_idle_add (unavailable_to_disconnected, self);
/* Make sure we don't leave the serial device open */
switch (state) {
case NM_DEVICE_STATE_NEED_AUTH:
case NM_DEVICE_STATE_UNMANAGED:
case NM_DEVICE_STATE_UNAVAILABLE:
case NM_DEVICE_STATE_FAILED:
case NM_DEVICE_STATE_DISCONNECTED:
nm_serial_device_close (NM_SERIAL_DEVICE (self));
break;
default:
break;
}
}
static GObject*

View file

@ -697,6 +697,19 @@ device_state_changed (NMDeviceInterface *device, NMDeviceState state, gpointer u
*/
if (state == NM_DEVICE_STATE_UNAVAILABLE)
priv->state_to_disconnected_id = g_idle_add (unavailable_to_disconnected, self);
/* Make sure we don't leave the serial device open */
switch (state) {
case NM_DEVICE_STATE_NEED_AUTH:
case NM_DEVICE_STATE_UNMANAGED:
case NM_DEVICE_STATE_UNAVAILABLE:
case NM_DEVICE_STATE_FAILED:
case NM_DEVICE_STATE_DISCONNECTED:
nm_serial_device_close (NM_SERIAL_DEVICE (self));
break;
default:
break;
}
}
static GObject*