sierra: early detect non-AT ports

Detect the parser filter errors during our custom_init(), and set the port as
not being AT if the error found.
This commit is contained in:
Aleksander Morgado
2013-04-03 12:29:14 +02:00
parent 069a17afd3
commit 464f33f77f

View File

@@ -86,6 +86,12 @@ gcap_ready (MMAtSerialPort *port,
g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) { g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) {
mm_port_probe_set_result_at (ctx->probe, FALSE); mm_port_probe_set_result_at (ctx->probe, FALSE);
} }
/* If reported a hard parse error, this port is definitely not an AT
* port, skip trying. */
else if (g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_PARSE_FAILED)) {
mm_port_probe_set_result_at (ctx->probe, FALSE);
ctx->retries = 0;
}
/* Just retry... */ /* Just retry... */
sierra_custom_init_step (ctx); sierra_custom_init_step (ctx);