[Bugfix][API-193][Network]Fix incorrect CID parameter type
Change-Id: If472b07473d9ab77bb470f99ce7de7cbbcf613c3
diff --git a/src/lynq/framework/lynq-ril-service/src/ril.cpp b/src/lynq/framework/lynq-ril-service/src/ril.cpp
index e0a27b7..915b399 100755
--- a/src/lynq/framework/lynq-ril-service/src/ril.cpp
+++ b/src/lynq/framework/lynq-ril-service/src/ril.cpp
@@ -3136,6 +3136,7 @@
break;
}
case RIL_CELL_INFO_TYPE_LTE: {
+ /*Typethree add for T800 earfcn 2022/06/09 start*/
appendPrintBuf("%s LTE id: mcc=%d,mnc=%d,ci=%d,pci=%d,tac=%d,earfcn=%d", printBuf,
p_cur->CellInfo.lte.cellIdentityLte.mcc,
p_cur->CellInfo.lte.cellIdentityLte.mnc,
@@ -3150,7 +3151,7 @@
p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.pci);
p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.tac);
p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.earfcn);
-
+ /*Typethree add for T800 earfcn 2022/06/09 end*/
appendPrintBuf("%s lteSS: ss=%d,rsrp=%d,rsrq=%d,rssnr=%d,cqi=%d,ta=%d", printBuf,
p_cur->CellInfo.lte.signalStrengthLte.signalStrength,
p_cur->CellInfo.lte.signalStrengthLte.rsrp,
@@ -3186,7 +3187,8 @@
}
#ifdef TELEMATIC_5G_SUPPORT
case RIL_CELL_INFO_TYPE_NR: {
- appendPrintBuf("%s NR id: mcc=%d,mnc=%d,nci=%d,pci=%d,tac=%d", printBuf,
+ /*Typethree add for T800 5G cid 2022/06/09 start*/
+ appendPrintBuf("%s NR id: mcc=%d,mnc=%d,nci=%llu,pci=%d,tac=%d", printBuf,
p_cur->CellInfo.nr.cellidentity.mcc,
p_cur->CellInfo.nr.cellidentity.mnc,
p_cur->CellInfo.nr.cellidentity.nci,
@@ -3196,11 +3198,11 @@
p.writeInt32(p_cur->CellInfo.nr.cellidentity.mcc);
p.writeInt32(p_cur->CellInfo.nr.cellidentity.mnc);
- p.writeInt32(p_cur->CellInfo.nr.cellidentity.nci);
+ p.writeUint64(p_cur->CellInfo.nr.cellidentity.nci);
p.writeInt32(p_cur->CellInfo.nr.cellidentity.pci);
p.writeInt32(p_cur->CellInfo.nr.cellidentity.tac);
p.writeInt32(p_cur->CellInfo.nr.cellidentity.nrarfcn);
-
+ /*Typethree add for T800 5G cid 2022/06/09 end*/
appendPrintBuf("%s NRSS: ssRsrp=%d,ssRsrq=%d,ssSinr=%d,csiRsrp=%d,csiRsrq=%d,csiSinr=%d", printBuf,
p_cur->CellInfo.nr.signalStrength.ssRsrp,
p_cur->CellInfo.nr.signalStrength.ssRsrq,
diff --git a/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h b/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h
index bc12950..60c4ae2 100755
--- a/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h
+++ b/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h
@@ -60,7 +60,7 @@
int lynq_query_registration_state(const char *type,int* regState,int* imsRegState,char * LAC,char * CID,int *netType,int *radioTechFam,int *netRejected);
int lynq_query_prefferred_networktype(int *preNetType);
int lynq_set_prefferred_networktype(const int preffertype);
-int lynq_query_cell_info(int cellinfo[CELLINFO_MAX_NUM],int tac[CELLINFO_MAX_NUM],int earfcn[CELLINFO_MAX_NUM],int * realNum);
+int lynq_query_cell_info(uint64_t cellinfo[CELLINFO_MAX_NUM],int tac[CELLINFO_MAX_NUM],int earfcn[CELLINFO_MAX_NUM],int * realNum);
int lynq_set_unsol_cell_info_listrate(const int rate);
int lynq_set_band_mode(const int bandmode);
int lynq_query_available_bandmode(int availBanMode[]);
diff --git a/src/lynq/lib/liblynq-network/lynq_network.cpp b/src/lynq/lib/liblynq-network/lynq_network.cpp
index 3f5dbe6..90ded4b 100755
--- a/src/lynq/lib/liblynq-network/lynq_network.cpp
+++ b/src/lynq/lib/liblynq-network/lynq_network.cpp
@@ -340,7 +340,7 @@
return 0;
}
-int copyCellInfoList(Parcel &p,int *cellinfo,int *tac,int *earfcn)
+int copyCellInfoList(Parcel &p,uint64_t *cellinfo,int *tac,int *earfcn)
{
int32_t v=0;
int64_t v6=0;
@@ -350,6 +350,7 @@
}
int nothing = 0;
+ int tmp_uint64 = 0;
p.readInt32(&v);
RIL_CellInfoType cellinfoType = RIL_CellInfoType(v);
p.readInt32(¬hing);
@@ -364,10 +365,11 @@
p.readInt32(¬hing);
p.readInt32(¬hing);
p.readInt32(¬hing);
- p.readInt32(cellinfo);
+ p.readInt32(&tmp_uint64);
p.readInt32(¬hing);
p.readInt32(¬hing);
p.readInt32(¬hing);
+ *cellinfo = (uint64_t)tmp_uint64;
tac = ¬hing;
earfcn = ¬hing;
break;
@@ -376,10 +378,11 @@
p.readInt32(¬hing);
p.readInt32(¬hing);
p.readInt32(¬hing);
- p.readInt32(cellinfo);
+ p.readInt32(&tmp_uint64);
p.readInt32(¬hing);
p.readInt32(¬hing);
p.readInt32(¬hing);
+ *cellinfo = (uint64_t)tmp_uint64;
tac = ¬hing;
earfcn = ¬hing;
break;
@@ -403,7 +406,7 @@
case RIL_CELL_INFO_TYPE_LTE: {
p.readInt32(¬hing);
p.readInt32(¬hing);
- p.readInt32(cellinfo);
+ p.readInt32(&tmp_uint64);
p.readInt32(¬hing);
p.readInt32(tac);
p.readInt32(earfcn);
@@ -413,15 +416,17 @@
p.readInt32(¬hing);
p.readInt32(¬hing);
p.readInt32(¬hing);
+ *cellinfo = (uint64_t)tmp_uint64;
break;
}
case RIL_CELL_INFO_TYPE_TD_SCDMA: {
p.readInt32(¬hing);
p.readInt32(¬hing);
p.readInt32(¬hing);
- p.readInt32(cellinfo);
+ p.readInt32(&tmp_uint64);
p.readInt32(¬hing);
p.readInt32(¬hing);
+ *cellinfo = (uint64_t)tmp_uint64;
tac = ¬hing;
earfcn = ¬hing;
break;
@@ -429,7 +434,7 @@
case RIL_CELL_INFO_TYPE_NR: {
p.readInt32(¬hing);
p.readInt32(¬hing);
- p.readInt32(cellinfo);
+ p.readUint64(cellinfo);
p.readInt32(¬hing);
p.readInt32(tac);
p.readInt32(earfcn);
@@ -442,7 +447,7 @@
break;
}
}
- LYINFLOG("CID in fUNC :%d",*cellinfo);
+ LYINFLOG("CID in fUNC :%llu",*cellinfo);
LYINFLOG("tac in fUNC :%d",*tac);
LYINFLOG("earfcn in fUNC :%d",*earfcn);
return 0;
@@ -947,7 +952,7 @@
}
-int lynq_query_cell_info(int cellinfo[CELLINFO_MAX_NUM],int tac[CELLINFO_MAX_NUM],int earfcn[CELLINFO_MAX_NUM],int * realNum)
+int lynq_query_cell_info(uint64_t cellinfo[CELLINFO_MAX_NUM],int tac[CELLINFO_MAX_NUM],int earfcn[CELLINFO_MAX_NUM],int * realNum)
{
int ret = -1;
if(NULL == realNum)