[PATCH] serial-port: ensure GCancellable handler is disconnected when serial port is closed
Ben Chan
benchan at chromium.org
Thu Sep 26 00:10:59 PDT 2013
---
src/mm-serial-port.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c
index 8774d40..dd82ce9 100644
--- a/src/mm-serial-port.c
+++ b/src/mm-serial-port.c
@@ -1112,6 +1112,13 @@ mm_serial_port_close (MMSerialPort *self)
priv->queue_id = 0;
}
+ if (priv->cancellable_id) {
+ g_assert (priv->cancellable != NULL);
+ g_cancellable_disconnect (priv->cancellable,
+ priv->cancellable_id);
+ priv->cancellable_id = 0;
+ }
+
g_clear_object (&priv->cancellable);
}
--
1.8.4
More information about the ModemManager-devel
mailing list