[PATCH] Fix '0' prefixed IMEI/ESN/MEID on QMI modems
Aleksander Morgado
aleksander at aleksander.es
Thu May 28 00:43:51 PDT 2015
On Thu, May 28, 2015 at 3:23 AM, David McCullough
<david.mccullough at accelecon.com> wrote:
>
> 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>
>
Thanks, pushed to git master and the mm-1-4 branch.
>
> 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
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list