From 62923f9086c80412f95a79c3a3148933837e74c9 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 28 Mar 2012 15:13:05 +0200 Subject: [PATCH] serial-port: ensure we close the port when forcing to close it --- src/mm-serial-port.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c index 3bc12d26..c783c795 100644 --- a/src/mm-serial-port.c +++ b/src/mm-serial-port.c @@ -1069,10 +1069,6 @@ mm_serial_port_close_force (MMSerialPort *self) mm_info ("(%s) forced to close port", mm_port_get_device (MM_PORT (self))); - /* Mark as having forced the close, so that we don't warn about incorrect - * open counts */ - priv->forced_close = TRUE; - /* If already closed, done */ if (!priv->open_count) return; @@ -1080,6 +1076,10 @@ mm_serial_port_close_force (MMSerialPort *self) /* Force the port to close */ priv->open_count = 1; mm_serial_port_close (self); + + /* Mark as having forced the close, so that we don't warn about incorrect + * open counts */ + priv->forced_close = TRUE; } static void