aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-09-08 17:41:25 -0700
committerDan Williams <dcbw@redhat.com>2009-09-08 17:41:25 -0700
commitc02adee8023a023c6f0fd9777d0908e17eb9d89c (patch)
tree8cae8d159e5e988708503926ccd664d54b7609fe /src
parent14e5c52f78e7ad23b18b111e3271cbecad6acf3f (diff)
serial: mark port disconnected on close
Otherwise it could still be connected when the port was opened again, and subsequent calls for stuff could fail.
Diffstat (limited to 'src')
-rw-r--r--src/mm-serial-port.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c
index 7de2db41..ced0f534 100644
--- a/src/mm-serial-port.c
+++ b/src/mm-serial-port.c
@@ -812,6 +812,8 @@ mm_serial_port_close (MMSerialPort *self)
if (priv->fd >= 0) {
g_message ("(%s) closing serial device...", mm_port_get_device (MM_PORT (self)));
+ mm_port_set_connected (MM_PORT (self), FALSE);
+
if (priv->channel) {
g_source_remove (priv->watch_id);
g_io_channel_shutdown (priv->channel, TRUE, NULL);