[PATCH] Fix '0' prefixed IMEI/ESN/MEID on QMI modems
David McCullough
david.mccullough at accelecon.com
Wed May 27 18:23:45 PDT 2015
QMI modems are incorrectly ignoring IMEI/ESN/MEID numbers that start with a
'0'. Fix this up. Seen on an AT&T Beam (340u)
Signed-off-by: David McCullough <david.mccullough at accelecon.com>
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index 4d234c6..f158fdf 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -1223,13 +1223,13 @@ dms_get_ids_ready (QmiClientDms *client,
*/
if (qmi_message_dms_get_ids_output_get_imei (output, &str, NULL) &&
- str[0] != '\0' && str[0] != '0') {
+ str[0] != '\0') {
g_free (ctx->self->priv->imei);
ctx->self->priv->imei = g_strdup (str);
}
if (qmi_message_dms_get_ids_output_get_esn (output, &str, NULL) &&
- str[0] != '\0' && str[0] != '0') {
+ str[0] != '\0') {
g_free (ctx->self->priv->esn);
len = strlen (str);
if (len == 7)
@@ -1241,7 +1241,7 @@ dms_get_ids_ready (QmiClientDms *client,
}
if (qmi_message_dms_get_ids_output_get_meid (output, &str, NULL) &&
- str[0] != '\0' && str[0] != '0') {
+ str[0] != '\0') {
g_free (ctx->self->priv->meid);
len = strlen (str);
if (len == 14)
--
David McCullough, david.mccullough at accelecon.com, Ph: 0410 560 763
More information about the ModemManager-devel
mailing list