mirror of git://git.sysmocom.de/ofono
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:
parent
26aba4612c
commit
a2a8e71db2
|
@ -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);
|
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);
|
str = qmi_result_get_string(result, QMI_DMS_RESULT_IMEI);
|
||||||
if (!str) {
|
if (!str) {
|
||||||
CALLBACK_WITH_FAILURE(cb, NULL, cbd->data);
|
CALLBACK_WITH_FAILURE(cb, NULL, cbd->data);
|
||||||
|
|
Loading…
Reference in New Issue