serial: rework 'connected' logic

So many modems just don't implement carrier detect that it makes
the previous 'connected' logic useless, so base it off connect/disconnect
and fix up a few places that didn't check connect status before
trying to send commands.  Also ensure the serial port is unlocked
for PPP to use when connected.
This commit is contained in:
Dan Williams
2009-07-06 11:40:22 -04:00
parent 869c69e223
commit 736aa0d2d6
12 changed files with 139 additions and 33 deletions

View File

@@ -20,7 +20,8 @@ GType mm_serial_error_get_type (void);
enum {
MM_MODEM_ERROR_GENERAL = 0,
MM_MODEM_ERROR_OPERATION_NOT_SUPPORTED = 1
MM_MODEM_ERROR_OPERATION_NOT_SUPPORTED = 1,
MM_MODEM_ERROR_CONNECTED = 2
};
#define MM_MODEM_ERROR (mm_modem_error_quark ())