serial-port: ensure we close the port when forcing to close it
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user