qmimodem: telit LE910 V1 - fix ESN string

Telit QMI modems report "0", rather than a NULL string,
if ESN is not available.
This commit is contained in:
Lukasz Nowak 2017-03-22 18:14:49 +00:00 committed by Denis Kenzior
parent 26aba4612c
commit a2a8e71db2
1 changed files with 2 additions and 1 deletions

View File

@ -125,7 +125,8 @@ static void get_ids_cb(struct qmi_result *result, void *user_data)
}
str = qmi_result_get_string(result, QMI_DMS_RESULT_ESN);
if (!str) {
/* Telit qmi modems return a "0" string when ESN is not available. */
if (!str || strcmp(str, "0") == 0) {
str = qmi_result_get_string(result, QMI_DMS_RESULT_IMEI);
if (!str) {
CALLBACK_WITH_FAILURE(cb, NULL, cbd->data);