aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-04-03 12:29:14 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-04-04 19:26:51 +0200
commit464f33f77f66738c17c14390d7605167f52f62e5 (patch)
tree82011d3a6a8e09b77ab6dc3539bfa1ed4d9b206a
parent069a17afd3c0ae007168987836ddaf9dfa63c3e0 (diff)
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.
-rw-r--r--plugins/sierra/mm-plugin-sierra.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/sierra/mm-plugin-sierra.c b/plugins/sierra/mm-plugin-sierra.c
index 8712c088..3d4ab7a3 100644
--- a/plugins/sierra/mm-plugin-sierra.c
+++ b/plugins/sierra/mm-plugin-sierra.c
@@ -86,6 +86,12 @@ gcap_ready (MMAtSerialPort *port,
g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) {
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... */
sierra_custom_init_step (ctx);