[Feature][T8TSK-126][AT]at+elapnmod can not input mccmnc
Change-Id: I8e9f1656fea8ed68a771d02169285de515eb99d8
diff --git a/framework/lynq-ril-service/src/ril.cpp b/framework/lynq-ril-service/src/ril.cpp
index 386fd13..e44cd49 100755
--- a/framework/lynq-ril-service/src/ril.cpp
+++ b/framework/lynq-ril-service/src/ril.cpp
@@ -3937,6 +3937,58 @@
return strndup16to8(s16, stringlen);
}
+static void lynq_get_mccmnc(Parcel &p, char *mccmnc)
+{
+ p.setDataPosition(0);
+ if(p.dataAvail() > 0)
+ {
+ int resp_type;
+ int token;
+ int request;
+ int slot_id;
+ int error1;
+ int num;
+ char *resp[128];
+ p.readInt32(&resp_type);
+ p.readInt32(&token);
+ p.readInt32(&request);
+ p.readInt32(&slot_id);
+ p.readInt32(&error1);
+ if(!error1)
+ {
+ p.readInt32(&num);
+ if(num == 0 || num > 128)
+ {
+ LYERRLOG("no paramters or num %d too great",num);
+ }
+ else
+ {
+ int i;
+ for(i = 0; i<num;i++)
+ {
+ resp[i] = lynqStrdupReadString(p);
+ }
+ if(NULL != resp[2])
+ {
+ strcpy(mccmnc,resp[2]);
+ printf("mcc mnc %s\n", mccmnc);
+ }
+ for(i = 0; i<num;i++)
+ {
+ if(resp[i]!=NULL)
+ {
+ free(resp[i]);
+ }
+ }
+ }
+ }
+ else
+ {
+ LYERRLOG("lynq_get_mccmnc error");
+ }
+ }
+}
+
extern "C" void
RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responselen) {
RequestInfo *pRI;
@@ -4254,6 +4306,7 @@
}
}
imei_cnt++;
+ free(test);
}
}
}
@@ -4286,6 +4339,10 @@
break;
}
/*lei add for AT+CGSN 2022/8/4*/
+ case RIL_REQUEST_OPERATOR:
+ {
+ lynq_get_mccmnc(p, mccmnc);
+ }
default:
break;
}