cdma: return numeric ERI too
This commit is contained in:
@@ -1437,7 +1437,7 @@ reg_query_speri_done (MMAtSerialPort *port,
|
|||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
p = mm_strip_tag (response->str, "$SPERI:");
|
p = mm_strip_tag (response->str, "$SPERI:");
|
||||||
if (!p || !mm_cdma_parse_eri (p, &roam, NULL))
|
if (!p || !mm_cdma_parse_eri (p, &roam, NULL, NULL))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
/* Change the 1x and EVDO registration states to roaming if they were
|
/* Change the 1x and EVDO registration states to roaming if they were
|
||||||
|
@@ -688,6 +688,7 @@ static const EriItem eris[] = {
|
|||||||
gboolean
|
gboolean
|
||||||
mm_cdma_parse_eri (const char *reply,
|
mm_cdma_parse_eri (const char *reply,
|
||||||
gboolean *out_roaming,
|
gboolean *out_roaming,
|
||||||
|
guint32 *out_ind,
|
||||||
const char **out_desc)
|
const char **out_desc)
|
||||||
{
|
{
|
||||||
long int ind;
|
long int ind;
|
||||||
@@ -700,6 +701,9 @@ mm_cdma_parse_eri (const char *reply,
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
ind = strtol (reply, NULL, 10);
|
ind = strtol (reply, NULL, 10);
|
||||||
if (errno == 0) {
|
if (errno == 0) {
|
||||||
|
if (out_ind)
|
||||||
|
*out_ind = ind;
|
||||||
|
|
||||||
while (iter->num != -1) {
|
while (iter->num != -1) {
|
||||||
if (iter->num == ind) {
|
if (iter->num == ind) {
|
||||||
*out_roaming = iter->roam_ind;
|
*out_roaming = iter->roam_ind;
|
||||||
|
@@ -51,6 +51,7 @@ gboolean mm_cdma_parse_spservice_response (const char *reply,
|
|||||||
|
|
||||||
gboolean mm_cdma_parse_eri (const char *reply,
|
gboolean mm_cdma_parse_eri (const char *reply,
|
||||||
gboolean *out_roaming,
|
gboolean *out_roaming,
|
||||||
|
guint32 *out_ind,
|
||||||
const char **out_desc);
|
const char **out_desc);
|
||||||
|
|
||||||
gboolean mm_gsm_parse_cscs_support_response (const char *reply,
|
gboolean mm_gsm_parse_cscs_support_response (const char *reply,
|
||||||
|
Reference in New Issue
Block a user