serial-port: forcing to close a port is an internal operation

Ports being forced to get closed will only happen when we get a HUP error
in the serial port (e.g. device got disconnected).
This commit is contained in:
Aleksander Morgado
2012-03-07 17:17:59 +01:00
parent 4f59a696fc
commit 48285dcfdf
2 changed files with 3 additions and 5 deletions

View File

@@ -35,6 +35,7 @@
#include "mm-log.h"
static gboolean mm_serial_port_queue_process (gpointer data);
static void mm_serial_port_close_force (MMSerialPort *self);
G_DEFINE_TYPE (MMSerialPort, mm_serial_port, MM_TYPE_PORT)
@@ -1055,7 +1056,7 @@ mm_serial_port_close (MMSerialPort *self)
g_clear_object (&priv->cancellable);
}
void
static void
mm_serial_port_close_force (MMSerialPort *self)
{
MMSerialPortPrivate *priv;
@@ -1527,8 +1528,7 @@ dispose (GObject *object)
priv->timeout_id = 0;
}
if (mm_serial_port_is_open (MM_SERIAL_PORT (object)))
mm_serial_port_close_force (MM_SERIAL_PORT (object));
mm_serial_port_close_force (MM_SERIAL_PORT (object));
mm_serial_port_flash_cancel (MM_SERIAL_PORT (object));

View File

@@ -117,8 +117,6 @@ gboolean mm_serial_port_open (MMSerialPort *self,
void mm_serial_port_close (MMSerialPort *self);
void mm_serial_port_close_force (MMSerialPort *self);
gboolean mm_serial_port_flash (MMSerialPort *self,
guint32 flash_time,
gboolean ignore_errors,