diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-19 07:35:23 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-09-19 07:42:47 +0200 |
commit | a6faae32608833f3d26d57bc6bace4f2a9add8bd (patch) | |
tree | 4dc6bb0e66272ebc9f2e993132105dc1e61ec4d3 /src/mm-modem-helpers.h | |
parent | d2353e01ff4b786da4542f7fd6f4f4e76081f450 (diff) |
broadband-modem: skip +CGMM: prefix when loading device model
Some devices, e.g. ZTE MF820D, seem to prefix the `AT+CGMM?' response with the
`+CGMM:' string, resulting in the following model string being loaded:
model: '+CGMM: "MF820D"'
Avoid this by:
1) Removing the expected prefixes.
2) Unquoting the resulting string.
Reported by: Marius Kotsbak <marius.kotsbak@gmail.com>
Diffstat (limited to 'src/mm-modem-helpers.h')
-rw-r--r-- | src/mm-modem-helpers.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h index 95b15ebc..b8573aa5 100644 --- a/src/mm-modem-helpers.h +++ b/src/mm-modem-helpers.h @@ -44,8 +44,9 @@ (MM_MODEM_CAPABILITY_GSM_UMTS | \ MM_MODEM_CAPABILITY_3GPP_LTE) -const gchar *mm_strip_tag (const gchar *str, - const gchar *cmd); +gchar *mm_strip_quotes (gchar *str); +const gchar *mm_strip_tag (const gchar *str, + const gchar *cmd); guint mm_count_bits_set (gulong number); |