aboutsummaryrefslogtreecommitdiff
path: root/src/mm-port-serial-qcdm.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2014-10-15 18:29:18 +0200
committerAleksander Morgado <aleksander@aleksander.es>2014-10-15 18:29:18 +0200
commitf2fa7a7fbf739ad38e0c10338bbcc59818c7670e (patch)
tree09372af13b53d3600f5dfa1b23fd57842a34bf25 /src/mm-port-serial-qcdm.c
parent41b7e7b048e67a0b329c820c81beccf42bf0957e (diff)
qcdm: don't retry probing if QCDM unescaping fails
But keep the retries when the frame marker isn't found. https://bugzilla.gnome.org/show_bug.cgi?id=708861
Diffstat (limited to 'src/mm-port-serial-qcdm.c')
-rw-r--r--src/mm-port-serial-qcdm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mm-port-serial-qcdm.c b/src/mm-port-serial-qcdm.c
index 42d12d7a..b63927ff 100644
--- a/src/mm-port-serial-qcdm.c
+++ b/src/mm-port-serial-qcdm.c
@@ -100,9 +100,9 @@ serial_command_ready (MMPortSerial *port,
/* Get the offset into the buffer of where the QCDM frame starts */
start = 0;
if (!find_qcdm_start (response_buffer, &start)) {
- error = g_error_new_literal (MM_CORE_ERROR,
- MM_CORE_ERROR_FAILED,
- "Failed to parse QCDM packet");
+ error = g_error_new_literal (MM_SERIAL_ERROR,
+ MM_SERIAL_ERROR_FRAME_NOT_FOUND,
+ "QCDM frame start not found");
/* Discard the unparsable data */
used = response_buffer->len;
goto out;
@@ -117,8 +117,8 @@ serial_command_ready (MMPortSerial *port,
&used,
&more);
if (!success) {
- error = g_error_new_literal (MM_CORE_ERROR,
- MM_CORE_ERROR_FAILED,
+ error = g_error_new_literal (MM_SERIAL_ERROR,
+ MM_SERIAL_ERROR_PARSE_FAILED,
"Failed to unescape QCDM packet");
g_free (unescaped_buffer);
unescaped_buffer = NULL;