[Bugfix][API-1238][DATA]data call status is disconnected,but data call list status is still active
Only Configure: No
Affected branch: All
Affected module: Data
Is it affected on both ZXIC and MTK: only MTK
Self-test: Yes
Doc Update: No
Change-Id: I2408c1abe6900ccab76c9e80d245cb136fb91fb6
diff --git a/framework/lynq-ril-service/src/data/data_gdbus.cpp b/framework/lynq-ril-service/src/data/data_gdbus.cpp
index 2d78727..980ebd8 100755
--- a/framework/lynq-ril-service/src/data/data_gdbus.cpp
+++ b/framework/lynq-ril-service/src/data/data_gdbus.cpp
@@ -184,8 +184,8 @@
#if DEBUG
printf("line %d for apn_table[%d].apn:%s,,,,urc_response->apnName:%s\n",__LINE__,i,apn_table[i].apn,urc_response->apnName);
#endif
- RLOGD("for apn_table[%d].apn:%s,,,,urc_response->apnName:%s\n",i,apn_table[i].apn,urc_response->apnName);
- if(strcmp(apn_table[i].apn,urc_response->apnName)==0)
+ RLOGD("for apn_table[%d].apntype:%s,,,,urc_response->apnType:%s\n",i,apn_table[i].apntype,urc_response->apnType);
+ if(strcmp(apn_table[i].apntype,urc_response->apnType)==0)
{
#if DEBUG
printf("line %d This apn has been created update???!!!\n",__LINE__);
@@ -306,15 +306,19 @@
char ptr[1] = "";
if(NULL == urc_response->ifname)
{
- memcpy(apn_table[i].ifaceName, ptr,strlen(ptr)+1);
+ memset(iface_t,0,LYNQ_APNTPYE_LEN_MAX);
+ memset(apn_table[i].ifaceName,0,LYNQ_APNTPYE_LEN_MAX);
+ }
+ else
+ {
+ memcpy(iface_t,urc_response->ifname,strlen(urc_response->ifname)+1);
}
if(NULL == urc_response->addresses)
{
- memcpy(apn_table[i].address, ptr, strlen(ptr)+1);
+ memset(apn_table[i].address,0,LYNQ_APNTPYE_LEN_MAX);
}
- memcpy(iface_t,apn_table[i].ifaceName,strlen(apn_table[i].ifaceName)+1);
- memcpy(apnType_t,apn_table[i].apntype,strlen(apn_table[i].apntype)+1);
- memcpy(apn_t,apn_table[i].apn,strlen(apn_table[i].apn)+1);
+ memcpy(apnType_t,urc_response->apnType,strlen(urc_response->apnType)+1);
+ memcpy(apn_t,urc_response->apnName,strlen(urc_response->apnName)+1);
p.writeInt32(1);
p.writeInt32(LYNQ_URC_DATA_CALL_STATUS_IND);
p.writeInt32(0);//temporary plan
@@ -353,15 +357,19 @@
char ptr[1] = "";
if(NULL == urc_response->ifname)
{
- memcpy(apn_table[i].ifaceName, ptr,strlen(ptr)+1);
+ memset(iface_t,0,LYNQ_APNTPYE_LEN_MAX);
+ memset(apn_table[i].ifaceName,0,LYNQ_APNTPYE_LEN_MAX);
+ }
+ else
+ {
+ memcpy(iface_t,urc_response->ifname,strlen(urc_response->ifname)+1);
}
if(NULL == urc_response->addresses)
{
- memcpy(apn_table[i].address, ptr, strlen(ptr)+1);
+ memset(apn_table[i].address,0,LYNQ_APNTPYE_LEN_MAX);
}
- memcpy(iface_t,apn_table[i].ifaceName,strlen(apn_table[i].ifaceName)+1);
- memcpy(apnType_t,apn_table[i].apntype,strlen(apn_table[i].apntype)+1);
- memcpy(apn_t,apn_table[i].apn,strlen(apn_table[i].apn)+1);
+ memcpy(apnType_t,urc_response->apnType,strlen(urc_response->apnType)+1);
+ memcpy(apn_t,urc_response->apnName,strlen(urc_response->apnName)+1);
p.writeInt32(1);
p.writeInt32(LYNQ_URC_DATA_CALL_STATUS_IND);
p.writeInt32(0);//temporary plan