Merge "Revert "[Feature][T106]version update to T106-MXX-INTEST-P56U10.AP.18.03_CAP.18.03"" into INTEST_PM_BASE
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/lynq_monitor.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/lynq_monitor.sh
old mode 100644
new mode 100755
index 72e61c7..b488ea7
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/lynq_monitor.sh
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc/lynq_monitor.sh
@@ -1,60 +1,66 @@
#!/bin/sh
while true
do
- sleep 30
- ps -ef|grep lynq-sdk-ready |grep -v "grep" > /dev/null
- if [ $? -ne 0 ]; then
+ sleep 10
+ ps_output=$(ps -A -o stat,pid,args | grep -E "lynq-ril-service|lynq-sdk-ready|autosuspend|lynq-atcid"|grep -v grep|grep -v T)
+ # 检查进程是否存在
+ sdk_output=$(echo "$ps_output" | grep "lynq-sdk-ready")
+ if [ -z "$sdk_output" ]; then
echo "lynq-sdk-ready no exist" > /dev/kmsg
sh /etc/init.d/lynq-sdk-ready.sh start
else
- ps -A -ostat,pid,comm |grep lynq-sdk-ready| grep Z > /dev/null
- if [ $? -eq 0 ]; then
+ # 检查是否为僵尸进程
+ if echo "$sdk_output" | grep -q "Z"; then
echo "lynq-sdk-ready state is Z" > /dev/kmsg
- pid=$(ps -A -ostat,pid,comm |grep lynq-sdk-ready|grep Z|awk '{print $2}')
+ pid=$(echo "$sdk_output" | awk '/Z/ {print $2}')
kill -9 $pid
sh /etc/init.d/lynq-sdk-ready.sh start
fi
fi
-
- ps -ef|grep lynq-atcid |grep -v "grep" > /dev/null
- if [ $? -ne 0 ]; then
+ sleep 10
+ atcid_output=$(echo "$ps_output" | grep "lynq-atcid")
+ # 检查进程是否存在
+ if [ -z "$atcid_output" ]; then
echo "lynq-atcid no exist" > /dev/kmsg
sh /etc/init.d/lynq-atcid.sh start
else
- ps -A -ostat,pid,comm |grep lynq-atcid| grep Z > /dev/null
- if [ $? -eq 0 ]; then
+ # 检查是否为僵尸进程
+ if echo "$atcid_output" | grep -q "Z"; then
echo "lynq-atcid state is Z" > /dev/kmsg
- pid=$(ps -A -ostat,pid,comm |grep lynq-atcid|grep Z|awk '{print $2}')
+ pid=$(echo "$atcid_output" | awk '/Z/ {print $2}')
kill -9 $pid
sh /etc/init.d/lynq-atcid.sh start
fi
fi
-
- ps -ef|grep lynq-ril-service |grep -v "grep" > /dev/null
- if [ $? -ne 0 ]; then
+ sleep 10
+ ril_output=$(echo "$ps_output" | grep "lynq-ril-service")
+ # 检查进程是否存在
+ if [ -z "$ril_output" ]; then
echo "lynq-ril-service no exist" > /dev/kmsg
sh /etc/init.d/lynq-ril-service.sh start
else
- ps -A -ostat,pid,comm |grep lynq-ril-service| grep Z > /dev/null
- if [ $? -eq 0 ]; then
+ # 检查是否为僵尸进程
+ if echo "$ril_output" | grep -q "Z"; then
echo "lynq-ril-service state is Z" > /dev/kmsg
- pid=$(ps -A -ostat,pid,comm |grep lynq-ril-service|grep Z|awk '{print $2}')
+ pid=$(echo "$ril_output" | awk '/Z/ {print $2}')
kill -9 $pid
sh /etc/init.d/lynq-ril-service.sh start
fi
fi
-
- ps -ef|grep autosuspend |grep -v "grep" > /dev/null
- if [ $? -ne 0 ]; then
+ sleep 10
+ suspend_output=$(echo "$ps_output" | grep "autosuspend")
+ # 检查进程是否存在
+ if [ -z "$suspend_output" ]; then
echo "lynq-autosuspend no exist" > /dev/kmsg
sh /etc/init.d/lynq-autosuspend.sh start
else
- ps -A -ostat,pid,comm |grep autosuspend| grep Z > /dev/null
- if [ $? -eq 0 ]; then
+ # 检查是否为僵尸进程
+ if echo "$suspend_output" | grep -q "Z"; then
echo "lynq-autosuspend state is Z" > /dev/kmsg
- pid=$(ps -A -ostat,pid,comm |grep autosuspend|grep Z|awk '{print $2}')
+ pid=$(echo "$suspend_output" | awk '/Z/ {print $2}')
kill -9 $pid
sh /etc/init.d/lynq-autosuspend.sh start
- fi
+ fi
fi
+
done
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
index 2d0643a..d892973 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
@@ -579,7 +579,7 @@
{
//xf.li@20230610 add for T106 data start
#ifdef MOBILETEK_TARGET_PLATFORM_T106
- LYINFLOG("[Typethree test info]apn=%s ;apntype=%s ;cid=%d ;ifname=%s ;hasTimeout = %d ; hasUsed = %d", \
+ LYDBGLOG("[Typethree test info]apn=%s ;apntype=%s ;cid=%d ;ifname=%s ;hasTimeout = %d ; hasUsed = %d", \
lynq_apn_table[ret].apn,lynq_apn_table[ret].apnType,lynq_apn_table[ret].cid,lynq_apn_table[ret].ifaceName, \
lynq_apn_table[ret].hasTimeout,lynq_apn_table[ret].hasUsed);
#else
@@ -623,7 +623,7 @@
int j = 0;
char *urc_msg = NULL;
- LYINFLOG("DATA in urc_msg_process_add_for_t106\n");
+ LYDBGLOG("DATA in urc_msg_process_add_for_t106\n");
int size = p->dataSize();
p->readInt32(&resp_type);
p->readInt32(&urcid);
@@ -784,7 +784,7 @@
//xf.li@20230607 add for T106 data end
void printf_apn_table_debug(const char *fun,int line)
{
- LYINFLOG("[%s][%d]apn_table msg",fun,line);
+ LYDBGLOG("[%s][%d]apn_table msg",fun,line);
printf_apn_table();
}
void urc_msg_process(Parcel *p)
@@ -2233,42 +2233,42 @@
p->readInt32(&dataCallList[i].cid);
p->readInt32(&dataCallList[i].active);
temp_char = strdupReadString_p(p);
- LYINFLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
+ LYDBGLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
if(temp_char)
{
memcpy(dataCallList[i].type,temp_char,strlen(temp_char)+1);
free(temp_char);
}
temp_char = strdupReadString_p(p);
- LYINFLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
+ LYDBGLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
if(temp_char)
{
memcpy(dataCallList[i].ifname,temp_char,strlen(temp_char)+1);
free(temp_char);
}
temp_char = strdupReadString_p(p);
- LYINFLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
+ LYDBGLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
if(temp_char)
{
memcpy(dataCallList[i].addresses,temp_char,strlen(temp_char)+1);
free(temp_char);
}
temp_char = strdupReadString_p(p);
- LYINFLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
+ LYDBGLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
if(temp_char)
{
memcpy(dataCallList[i].dnses,temp_char,strlen(temp_char)+1);
free(temp_char);
}
temp_char = strdupReadString_p(p);
- LYINFLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
+ LYDBGLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
if(temp_char)
{
memcpy(dataCallList[i].gateways,temp_char,strlen(temp_char)+1);
free(temp_char);
}
temp_char = strdupReadString_p(p);
- LYINFLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
+ LYDBGLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
if(temp_char)
{
memcpy(dataCallList[i].pcscf,temp_char,strlen(temp_char)+1);
@@ -2328,9 +2328,11 @@
memcpy(dataCallList->gateways,interDataCallList[i].gateways,sizeof(interDataCallList[i].gateways));
memcpy(dataCallList->pcscf,interDataCallList[i].pcscf,sizeof(interDataCallList[i].pcscf));
//LYINFLOG("ifname:%s,addr:%s",dataCallList->ifname,dataCallList->addresses);
- LYINFLOG("[lynq_get_data_call_list]: status=%d, suggestedRetryTime=%d, cid=%d, active=%d, type=%s, ifname=%s, addresses=%s, dnses=%s, gateways=%s, pcscf=%s, mtu=%d\n",
+ LYINFLOG("[lynq_get_data_call_list]: status=%d, suggestedRetryTime=%d, cid=%d, active=%d, type=%s, ifname=%s, addresses=%s\n",
dataCallList->status, dataCallList->suggestedRetryTime, dataCallList->cid, dataCallList->active,
- dataCallList->type, dataCallList->ifname, dataCallList->addresses, dataCallList->dnses, dataCallList->gateways, dataCallList->pcscf,
+ dataCallList->type, dataCallList->ifname, dataCallList->addresses);
+ LYINFLOG("[lynq_get_data_call_list]: dnses=%s, gateways=%s, pcscf=%s, mtu=%d\n",
+ dataCallList->dnses, dataCallList->gateways, dataCallList->pcscf,
dataCallList->mtu);
}
@@ -2342,7 +2344,7 @@
{
if (data_waiting_status == 1)
{
- LYINFLOG("some thread is waiting");
+ LYERRLOG("some thread is waiting");
return -3;
}
LYINFLOG("is empty :%d",s_data_urc_wait_list.empty());
@@ -2353,7 +2355,7 @@
waitPdnChange();
if(g_lynq_data_init_flag == 0)
{
- LYINFLOG("has deinit, need exit");
+ LYERRLOG("has deinit, need exit");
return -1;
}
}
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data_list_buffer.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data_list_buffer.cpp
index 6a1356d..e1bf260 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data_list_buffer.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data_list_buffer.cpp
@@ -60,7 +60,7 @@
void data_timer_handler(sigval_t sig)
{
- LYINFLOG("[%s] entry\n",__FUNCTION__);
+ LYDBGLOG("[%s] entry\n",__FUNCTION__);
s_list_buffer_valid = false;
}
@@ -117,7 +117,7 @@
void set_list_buffer_valid(int valid)
{
- LYINFLOG("[%s] entry\n",__FUNCTION__);
+ LYDBGLOG("[%s] entry\n",__FUNCTION__);
s_list_buffer_valid = valid;
if(s_list_buffer_valid==false)
@@ -136,7 +136,7 @@
int ret;
int i;
- LYINFLOG("[%s] entry\n",__FUNCTION__);
+ LYDBGLOG("[%s] entry\n",__FUNCTION__);
number_buffer = number;
memcpy(dataCallList_buffer, dataCallList, sizeof(lynq_data_call_response_v11_t)*LYNQ_APN_CHANNEL_MAX);
set_list_buffer_valid(true);
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data_urc.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data_urc.cpp
index 8cf5e45..db6c256 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data_urc.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data_urc.cpp
@@ -166,9 +166,9 @@
pthread_mutex_lock(&s_lynq_urc_mutex);
//xf.li@20230610 add for T106 data start
#ifdef MOBILETEK_TARGET_PLATFORM_T106
- LYINFLOG("DATA urc_msg_process_add_in_urccpp end\n");
+ LYDBGLOG("DATA urc_msg_process_add_in_urccpp end\n");
urc_msg_process_add_for_t106(urc_p);
- LYINFLOG("DATA urc_msg_process_add_in_datacpp end\n");
+ LYDBGLOG("DATA urc_msg_process_add_in_datacpp end\n");
#else
urc_msg_process(urc_p);
#endif
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_socket.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_socket.cpp
index cf51053..2a978cc 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_socket.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_socket.cpp
@@ -156,7 +156,7 @@
(*iter)->readInt32(&wakeup_token);
if(wakeup_token==waitToken)
{
- LYINFLOG("%s get waitToken",__func__);
+ LYINFLOG("%s get waitToken, cnt is %d",__func__,cnt);
p=(*iter);
p->setDataPosition(0);
s_recv_parcel_list.erase(iter);
@@ -172,7 +172,7 @@
}
}
waitResponse_end:
- LYINFLOG("%s wait token is %d wakeup_token is %d, cnt is %d",__func__,waitToken,wakeup_token,cnt);
+ LYDBGLOG("%s wait token is %d wakeup_token is %d, cnt is %d",__func__,waitToken,wakeup_token,cnt);
pthread_cleanup_pop(0);
BLOCK_RECV_MSG_UNLOCK();
return wakeup_token==waitToken ? 0:LYNQ_E_TIME_OUT;
@@ -195,7 +195,6 @@
*/
int GetHeader(Parcel* &p, lynq_resp_t& head)
{
- LYINFLOG("get header");
if(p->dataAvail() > 0)
{
p->readInt32(&(head.resp_type));
@@ -304,11 +303,11 @@
size=((responseType>>SHM_BUFFER_SIZE_OFFSET)&SHM_BUFFER_SIZE_MASK);
if(size>=sizeof(int32_t)*3 && get_shem_buffer_level(size,&level))
{
- LYINFLOG("urc_data_is_in_shm_data level is %d, index is %d size is %d",level,index,size);
+ LYDBGLOG("urc_data_is_in_shm_data level is %d, index is %d size is %d",level,index,size);
return true;
}
}
- LYINFLOG("urc_data_is_in_shm_data return false, responseType is %d",responseType);
+ LYDBGLOG("urc_data_is_in_shm_data return false, responseType is %d",responseType);
return false;
}
/*hq add for urc broadcase optimisson 2023/01/03 end*/
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_state_buffer.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_state_buffer.cpp
index 22a6fac..95323ed 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_state_buffer.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_state_buffer.cpp
@@ -99,7 +99,7 @@
}
void stop_network_timer(timer_t timer, int signal_value) {
- LYINFLOG("stop_network_timer(), timer_id=%ld, signal_value=%d", (long)timer, signal_value);
+ LYDBGLOG("stop_network_timer(), timer_id=%ld, signal_value=%d", (long)timer, signal_value);
struct itimerspec timespec;
if(timer_gettime(timer, ×pec) == -1) {
LYERRLOG("stop_network_timer(), get time fail(%s)", strerror(errno));
@@ -107,7 +107,7 @@
}
LYINFLOG("stop_network_timer(), tv_sec=%ld, tv_nsec=%ld",timespec.it_value.tv_sec, timespec.it_value.tv_nsec);
if((timespec.it_value.tv_sec == 0) && (timespec.it_value.tv_nsec == 0) ) {
- LYINFLOG("stop_network_timer(), timer_id(%ld) had stopped, just return", (long)timer);
+ LYDBGLOG("stop_network_timer(), timer_id(%ld) had stopped, just return", (long)timer);
return;
} else {
start_network_timer(timer, signal_value, 0);
@@ -177,6 +177,10 @@
{
valid=false;
}
+ else
+ {
+ LYINFLOG("%s type %d valid is %d",__func__,type,valid);
+ }
s_state_buffer_valid[type] = valid;
if(s_state_buffer_valid[type]==false)
{
@@ -185,8 +189,7 @@
else
{
start_network_timer(s_state_buffer_timer[type], s_state_buffer_sig_value[type],s_state_buffer_cfg.valid_period[type]*1000);
- }
- LYINFLOG("%s type %d valid is %d",__func__,type,valid);
+ }
}
int get_state_buffer_valid(lynq_network_state_buffer_type type)
@@ -201,7 +204,7 @@
if(is_period_equal_not_valid(s_state_buffer_cfg.valid_period[type]))
{
- LYINFLOG("%s type %d timer length %d is equal not valid",__func__,type,s_state_buffer_cfg.valid_period[type]);
+ LYDBGLOG("%s type %d timer length %d",__func__,type,s_state_buffer_cfg.valid_period[type]);
return;
}
@@ -223,7 +226,7 @@
for(i=0;i<int_num;i++)
{
int_value=va_arg(pArgs, int);
- LYINFLOG("%s int_value is %d",__func__,int_value);
+ LYINFLOG("int_value is %d",int_value);
ret = write(fd_backup,&int_value,sizeof (int));
if(ret<=0)
{
@@ -243,7 +246,7 @@
{
p_value=va_arg(pArgs, char*);
stringLen=strlen(p_value)+1;
- LYINFLOG("%s p_value is %s,stringlen is %d",__func__,p_value,stringLen);
+ LYINFLOG("p_value is %s,stringlen is %d",p_value,stringLen);
ret = write(fd_backup,&stringLen,sizeof(int));
if(ret<=0)
{
@@ -279,7 +282,7 @@
if(!get_state_buffer_valid(type))
{
- LYINFLOG("%s type %d buffer not valid",__func__,type);
+ LYDBGLOG("%s type %d buffer not valid",__func__,type);
return 1;
}
@@ -302,14 +305,13 @@
for(i=0;i<int_p_num;i++)
{
int_p_value=va_arg(pArgs, int*);
- ret = read(fd_backup,int_p_value,sizeof (int));
- LYINFLOG("%s int_p_value is %d",__func__,(*int_p_value));
+ ret = read(fd_backup,int_p_value,sizeof (int));
if(ret<=0)
{
LYERRLOG("%s read int %d fail, ret is %d",__func__,i,ret);
goto get_state_error_done;
}
-
+ LYINFLOG("int_p_value is %d",(*int_p_value));
}
int stringNum;
@@ -326,7 +328,7 @@
LYERRLOG("%s get %d string len fail, ret is %d",__func__,i,ret);
goto get_state_error_done;
}
- LYINFLOG("%s stringlen is %d",__func__,stringLen);
+ LYINFLOG("stringlen is %d",stringLen);
p_value=va_arg(pArgs, char*);
ret = read(fd_backup,p_value,stringLen);
if(ret<=0)
@@ -334,7 +336,7 @@
LYERRLOG("%s get %d string fail, stringlen is %d, ret is %d",__func__, stringLen,ret);
goto get_state_error_done;
}
- LYINFLOG("%s p_value is %s",__func__,p_value);
+ LYINFLOG("p_value is %s",p_value);
}
va_end(pArgs);
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
index c10be55..f0c0bba 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
@@ -388,9 +388,7 @@
break;
}
}
- LYINFLOG("CID in fUNC :%llu",*cellinfo);
- LYINFLOG("tac in fUNC :%d",*tac);
- LYINFLOG("earfcn in fUNC :%d",*earfcn);
+ LYINFLOG("CID:%llu, tac:%d, earfcn:%d",*cellinfo,*tac,*earfcn);
return RESULT_OK;
}
@@ -492,7 +490,7 @@
}
for(i=0; i<(*valid_number); i++)
{
- LYERRLOG("cell info %d is %d",i, cell_info[i]);
+ LYDBGLOG("cell info %d is %d",i, cell_info[i]);
}
return RESULT_OK;
}
@@ -564,7 +562,7 @@
}
}
- LYINFLOG("%s suc",__func__);
+ LYDBGLOG("%s suc",__func__);
delete p;
return RESULT_OK;
}
@@ -596,7 +594,7 @@
p->readInt32(&readnum);
p->readInt32(netselMode);
- LYINFLOG("%s suc",__func__);
+ LYINFLOG("%s suc %d",__func__,*netselMode);
delete p;
return RESULT_OK;
}
@@ -647,7 +645,7 @@
return ret;
}
- LYINFLOG("%s set mode %s mccmnc %s suc",__func__,mode,mccmnc);
+ LYDBGLOG("%s set mode %s mccmnc %s suc",__func__,mode,mccmnc);
delete p;
return RESULT_OK;
}
@@ -712,7 +710,7 @@
}
}
delete p;
- LYINFLOG("%s suc",__func__);
+ LYDBGLOG("%s suc",__func__);
return RESULT_OK;
}
@@ -776,6 +774,7 @@
*netRejected = atoi(resp[reject_index]);
}
}
+ LYINFLOG("regstate:%d, CID:%s, LAC:%s, netType:%d, reject_code:%d",*regState,CID,LAC,*netType,*netRejected);
registration_from_parcel_return:
@@ -899,6 +898,7 @@
p->readInt32(imsRegState);
p->readInt32(radioTechFam);
set_state_to_buf(NETWORK_STATE_BUFFER_TYPE_IMS_REG,2,*imsRegState,*radioTechFam,0);
+ LYINFLOG("imsRegState:%d, radioTechFam:%d",*imsRegState,*radioTechFam);
}
else
{
@@ -912,7 +912,7 @@
if(ret==RESULT_OK)
{
- LYINFLOG("%s suc",__func__);
+ LYDBGLOG("%s suc",__func__);
}
delete p;
@@ -946,7 +946,7 @@
p->readInt32(&num);
p->readInt32(preNetType);
- LYINFLOG("%s suc",__func__);
+ LYINFLOG("%s suc %d",__func__,*preNetType);
delete p;
return RESULT_OK;
}
@@ -973,7 +973,7 @@
return ret;
}
- LYINFLOG("%s set %d suc",__func__,preffertype);
+ LYDBGLOG("%s set %d suc",__func__,preffertype);
delete p;
return RESULT_OK;
@@ -1011,7 +1011,7 @@
copyCellInfoList(p,&cellinfo[i],&tac[i],&earfcn[i]);
}
- LYINFLOG("%s suc",__func__);
+ LYDBGLOG("%s suc",__func__);
delete p;
return RESULT_OK;
}
@@ -1171,7 +1171,7 @@
}
- LYINFLOG("%s suc",__func__);
+ LYDBGLOG("%s suc",__func__);
delete p;
return RESULT_OK;
}
@@ -1314,13 +1314,13 @@
}
memmove(data_str, data, data_len);
data_str[data_len]='\0';
- LYINFLOG("%s return string is %s",__func__,data_str);
+ LYINFLOG("AT Rsp string is %s",data_str);
start = strstr(data_str,tagString);
int local_valid_num=0;
if(start!=NULL)
{
start=start+strlen(tagString);
- length=strlen(start);
+ length=strlen(start)+1;
for(i=0; i<length;i++)
{
if((!bfind) && (start[i] >= '0') && (start[i] <= '9'))
@@ -1339,16 +1339,12 @@
}
else
{
- LYERRLOG("%s can't find tag string",__func__,tagString);
+ LYERRLOG("AT Rsp can't find tag %s",tagString);
ret=LYNQ_E_INNER_ERROR;
}
- if(local_valid_num ==0)
- {
- LYERRLOG("%s can't find integer",__func__);
- }
*valid_num = local_valid_num;
- LYINFLOG("%s ret is %d valid num is %d ",__func__,ret,*valid_num);
+ LYINFLOG("AT Rsp ret is %d v num is %d",ret,*valid_num);
free(data_str);
return ret;
}
@@ -1591,10 +1587,10 @@
p->readInt32(&solSigStren->rsrq);
p->readInt32(&solSigStren->rssnr);
- LYINFLOG("LTE_signalstrength:%d",solSigStren->lte_signalstrength);
if(is_rssi_valid(solSigStren->lte_signalstrength))
{
solSigStren->lte_sig_valid = 1;
+ LYINFLOG("LTE_rsrp:%d",-solSigStren->rsrp);
}else{
solSigStren->lte_sig_valid = 0;
}
@@ -1610,10 +1606,9 @@
p->readInt32(&rscp);
p->readInt32(&ecno);
-
- LYINFLOG("WCDMA_signalstrength:%d",solSigStren->wcdma_signalstrength);
if(is_rssi_valid(solSigStren->wcdma_signalstrength))
{
+ LYINFLOG("W_ss:%d",solSigStren->wcdma_signalstrength);
solSigStren->wcdma_sig_valid = 1;
convert_rscp(rscp,&solSigStren->rscp);
convert_ecno(ecno,&solSigStren->ecno);
@@ -1631,13 +1626,13 @@
p->readInt32(&solSigStren->csiRsrp);
p->readInt32(&solSigStren->csiRsrq);
p->readInt32(&solSigStren->csiSinr);
+ LYINFLOG("Nr_ssrp:%d",-(solSigStren->ssRsrp));
}
else{
- LYERRLOG("None of NR signal info");
solSigStren->nr_sig_valid = 0;
}
- LYINFLOG("%s suc",__func__);
+ LYDBGLOG("%s suc",__func__);
delete p;
return RESULT_OK;
}
@@ -1809,7 +1804,7 @@
if(is_rssi_valid(s_network_urc_solSigStren.lte_signalstrength))
{
s_network_urc_solSigStren.lte_sig_valid = 1;
- LYINFLOG("urc_LTE_signalstrength:%d",s_network_urc_solSigStren.lte_signalstrength);
+ LYINFLOG("urc_L_rsrp:%d",-(s_network_urc_solSigStren.rsrp));
}else{
s_network_urc_solSigStren.lte_sig_valid = 0;
}
@@ -1827,7 +1822,7 @@
s_network_urc_solSigStren.wcdma_sig_valid = 1;
convert_rscp(rscp,&s_network_urc_solSigStren.rscp);
convert_ecno(ecno,&s_network_urc_solSigStren.ecno);
- LYINFLOG("urc_WCDMA_signalstrength:%d",s_network_urc_solSigStren.wcdma_signalstrength);
+ LYINFLOG("urc_W_ss:%d",s_network_urc_solSigStren.wcdma_signalstrength);
}else{
s_network_urc_solSigStren.wcdma_sig_valid = 0;
}
@@ -2015,7 +2010,7 @@
}
}
- LYINFLOG("%s ret is %d",__func__,ret);
+ LYDBGLOG("%s ret is %d",__func__,ret);
delete p;
return ret;
}
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
index 094547f..e27a205 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
@@ -85,7 +85,7 @@
tmp_char = strsep(&addresses, addresses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 addresses = %s", tmp_char);
+ LYDBGLOG("ipv4 addresses = %s", tmp_char);
inet_aton(tmp_char,&(data_res->v4.ip));
}
@@ -93,13 +93,13 @@
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 pri_dns = %s", tmp_char);
+ LYDBGLOG("ipv4 pri_dns = %s", tmp_char);
inet_aton(tmp_char,&(data_res->v4.pri_dns));
}
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 sec_dns = %s", tmp_char);
+ LYDBGLOG("ipv4 sec_dns = %s", tmp_char);
inet_aton(tmp_char, &(data_res->v4.sec_dns));
}
//get gateway
@@ -129,20 +129,20 @@
tmp_char = strsep(&addresses, addresses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 addresses = %s", tmp_char);
+ LYDBGLOG("ipv6 addresses = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.ip));
}
//get dnses
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 pri_dns = %s", tmp_char);
+ LYDBGLOG("ipv6 pri_dns = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.pri_dns));
}
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 sec_dns = %s", tmp_char);
+ LYDBGLOG("ipv6 sec_dns = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.sec_dns));
}
inet_pton(AF_INET6,libdata->gateways,&(data_res->v6.gateway));
@@ -175,53 +175,53 @@
tmp_char = strsep(&addresses, addresses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 addresses = %s", tmp_char);
+ LYDBGLOG("ipv4 addresses = %s", tmp_char);
inet_aton(tmp_char,&(data_res->v4.ip));
}
tmp_char = strsep(&addresses, addresses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 addresses = %s", tmp_char);
+ LYDBGLOG("ipv6 addresses = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.ip));
}
//get dnses
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 pri_dns = %s", tmp_char);
+ LYDBGLOG("ipv4 pri_dns = %s", tmp_char);
inet_aton(tmp_char,&(data_res->v4.pri_dns));
}
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 sec_dns = %s", tmp_char);
+ LYDBGLOG("ipv4 sec_dns = %s", tmp_char);
inet_aton(tmp_char, &(data_res->v4.sec_dns));
}
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 pri_dns = %s", tmp_char);
+ LYDBGLOG("ipv6 pri_dns = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.pri_dns));
}
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 sec_dns = %s", tmp_char);
+ LYDBGLOG("ipv6 sec_dns = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.sec_dns));
}
//get gateway
inet_aton(libdata->gateways,&(data_res->v4.gateway));
inet_pton(AF_INET6,libdata->gateways,&(data_res->v6.gateway));
- LYINFLOG("v4.ip=%s", inet_ntoa(data_res->v4.ip));
- LYINFLOG("v4.pri_dns=%s", inet_ntoa(data_res->v4.pri_dns));
- LYINFLOG("v4.sec_dns=%s", inet_ntoa(data_res->v4.sec_dns));
+ LYDBGLOG("v4.ip=%s", inet_ntoa(data_res->v4.ip));
+ LYDBGLOG("v4.pri_dns=%s", inet_ntoa(data_res->v4.pri_dns));
+ LYDBGLOG("v4.sec_dns=%s", inet_ntoa(data_res->v4.sec_dns));
inet_ntop(AF_INET6, &(data_res->v6.ip), buf_ip, sizeof(buf_ip));
inet_ntop(AF_INET6, &(data_res->v6.gateway), buf_gateway, sizeof(buf_gateway));
inet_ntop(AF_INET6, &(data_res->v6.pri_dns), buf_pri_dns, sizeof(buf_pri_dns));
inet_ntop(AF_INET6, &(data_res->v6.sec_dns), buf_sec_dns, sizeof(buf_sec_dns));
- LYINFLOG("v6.ip=%s, v6.gateway=%s, v6.pri_dns=%s, v6.sec_dns=%s\n"
+ LYDBGLOG("v6.ip=%s, v6.gateway=%s, v6.pri_dns=%s, v6.sec_dns=%s\n"
, buf_ip, buf_gateway, buf_pri_dns, buf_sec_dns);
return ;
}
@@ -241,29 +241,29 @@
tmp_char = strsep(&addresses, addresses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 addresses = %s", tmp_char);
+ LYDBGLOG("ipv4 addresses = %s", tmp_char);
inet_aton(tmp_char,&(data_res->v4.addr.ip));
}
//get dnses
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 pri_dns = %s", tmp_char);
+ LYDBGLOG("ipv4 pri_dns = %s", tmp_char);
inet_aton(tmp_char,&(data_res->v4.addr.pri_dns));
}
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 sec_dns = %s", tmp_char);
+ LYDBGLOG("ipv4 sec_dns = %s", tmp_char);
inet_aton(tmp_char, &(data_res->v4.addr.sec_dns));
}
//get gateway
- LYINFLOG("ipv4 gateways = %s", libdata->gateways);
+ LYDBGLOG("ipv4 gateways = %s", libdata->gateways);
inet_aton(libdata->gateways,&(data_res->v4.addr.gateway));
- LYINFLOG("v4.ip=%s", inet_ntoa(data_res->v4.addr.ip));
- LYINFLOG("v4.pri_dns=%s", inet_ntoa(data_res->v4.addr.pri_dns));
- LYINFLOG("v4.sec_dns=%s", inet_ntoa(data_res->v4.addr.sec_dns));
+ LYDBGLOG("v4.ip=%s", inet_ntoa(data_res->v4.addr.ip));
+ LYDBGLOG("v4.pri_dns=%s", inet_ntoa(data_res->v4.addr.pri_dns));
+ LYDBGLOG("v4.sec_dns=%s", inet_ntoa(data_res->v4.addr.sec_dns));
#else
inet_aton(libdata->addresses,&(data_res->v4.addr.ip));
inet_aton(libdata->gateways,&(data_res->v4.addr.gateway));
@@ -294,20 +294,20 @@
tmp_char = strsep(&addresses, addresses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 addresses = %s", tmp_char);
+ LYDBGLOG("ipv6 addresses = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.addr.ip));
}
//get dnses
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 pri_dns = %s", tmp_char);
+ LYDBGLOG("ipv6 pri_dns = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.addr.pri_dns));
}
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 sec_dns = %s", tmp_char);
+ LYDBGLOG("ipv6 sec_dns = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.addr.sec_dns));
}
inet_pton(AF_INET6,libdata->gateways,&(data_res->v6.addr.gateway));
@@ -344,54 +344,54 @@
tmp_char = strsep(&addresses, addresses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 addresses = %s", tmp_char);
+ LYDBGLOG("ipv4 addresses = %s", tmp_char);
inet_aton(tmp_char,&(data_res->v4.addr.ip));
}
tmp_char = strsep(&addresses, addresses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 addresses = %s", tmp_char);
+ LYDBGLOG("ipv6 addresses = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.addr.ip));
}
//get dnses
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 pri_dns = %s", tmp_char);
+ LYDBGLOG("ipv4 pri_dns = %s", tmp_char);
inet_aton(tmp_char,&(data_res->v4.addr.pri_dns));
}
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv4 sec_dns = %s", tmp_char);
+ LYDBGLOG("ipv4 sec_dns = %s", tmp_char);
inet_aton(tmp_char, &(data_res->v4.addr.sec_dns));
}
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 pri_dns = %s", tmp_char);
+ LYDBGLOG("ipv6 pri_dns = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.addr.pri_dns));
}
tmp_char = strsep(&dnses, dnses_separator);
if(tmp_char != NULL)
{
- LYINFLOG("ipv6 sec_dns = %s", tmp_char);
+ LYDBGLOG("ipv6 sec_dns = %s", tmp_char);
inet_pton(AF_INET6, tmp_char, &(data_res->v6.addr.sec_dns));
}
//get gateway
inet_aton(libdata->gateways,&(data_res->v4.addr.gateway));
inet_pton(AF_INET6,libdata->gateways,&(data_res->v6.addr.gateway));
- LYINFLOG("v4.ip=%s", inet_ntoa(data_res->v4.addr.ip));
- LYINFLOG("ipv4 gateways = %s", inet_ntoa(data_res->v4.addr.gateway));
- LYINFLOG("v4.pri_dns=%s", inet_ntoa(data_res->v4.addr.pri_dns));
- LYINFLOG("v4.sec_dns=%s", inet_ntoa(data_res->v4.addr.sec_dns));
+ LYDBGLOG("v4.ip=%s", inet_ntoa(data_res->v4.addr.ip));
+ LYDBGLOG("ipv4 gateways = %s", inet_ntoa(data_res->v4.addr.gateway));
+ LYDBGLOG("v4.pri_dns=%s", inet_ntoa(data_res->v4.addr.pri_dns));
+ LYDBGLOG("v4.sec_dns=%s", inet_ntoa(data_res->v4.addr.sec_dns));
inet_ntop(AF_INET6, &(data_res->v6.addr.ip), buf_ip, sizeof(buf_ip));
inet_ntop(AF_INET6, &(data_res->v6.addr.gateway), buf_gateway, sizeof(buf_gateway));
inet_ntop(AF_INET6, &(data_res->v6.addr.pri_dns), buf_pri_dns, sizeof(buf_pri_dns));
inet_ntop(AF_INET6, &(data_res->v6.addr.sec_dns), buf_sec_dns, sizeof(buf_sec_dns));
- LYINFLOG("v6.ip=%s, v6.gateway=%s, v6.pri_dns=%s, v6.sec_dns=%s\n"
+ LYDBGLOG("v6.ip=%s, v6.gateway=%s, v6.pri_dns=%s, v6.sec_dns=%s\n"
, buf_ip, buf_gateway, buf_pri_dns, buf_sec_dns);
data_res->v4.stats.pkts_tx = 0;
data_res->v4.stats.pkts_rx = 0;
@@ -448,7 +448,7 @@
}
int *temp = (int *)data;
for(int i=0; i<argc; i++){
- LYINFLOG("[%s]%s = %s", __FUNCTION__,azColName[i], argv[i] ? argv[i] : "NULL");
+ LYDBGLOG("[%s]%s = %s", __FUNCTION__,azColName[i], argv[i] ? argv[i] : "NULL");
}
*temp = atoi(argv[0]);
return 0;
@@ -470,7 +470,7 @@
return LYNQ_E_APN_DB_FAIL;
}
- LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully\n",__FUNCTION__);
/* Create SQL statement */
sprintf(sql,"SELECT ID from LYNQAPN WHERE HANDLE=%d", handle);
LYINFLOG("sql: %s\n", sql);
@@ -494,10 +494,10 @@
int i;
apn_indexs[atoi(argv[0])] = atoi(argv[0]);
- LYINFLOG("apn_indexs[%d] is %d", atoi(argv[0]), apn_indexs[atoi(argv[0])]);
+ LYDBGLOG("apn_indexs[%d] is %d", atoi(argv[0]), apn_indexs[atoi(argv[0])]);
for(i=0; i<argc; i++){
- LYINFLOG("%s = %s", azColName[i], argv[i] ? argv[i] : "NULL");
+ LYDBGLOG("%s = %s", azColName[i], argv[i] ? argv[i] : "NULL");
}
return 0;
}
@@ -540,7 +540,7 @@
{
if(index == apn_indexs[cnt])
{
- LYINFLOG("index = apn_index\n");
+ LYDBGLOG("index = apn_index\n");
sqlite3_close(apnDb);
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 1;
@@ -572,7 +572,7 @@
return LYNQ_E_APN_DB_FAIL;
}
- LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully\n",__FUNCTION__);
/* Create SQL statement */
//sql = "SELECT * from LYNQAPN";
sprintf(sql,"UPDATE LYNQAPN SET HANDLE=%d WHERE ID=%d", handle, (int)profile_idx);
@@ -600,7 +600,7 @@
}
int *temp = (int *)data;
for(int i=0; i<argc; i++){
- LYINFLOG("[%s]%s = %s", __FUNCTION__,azColName[i], argv[i] ? argv[i] : "NULL");
+ LYDBGLOG("[%s]%s = %s", __FUNCTION__,azColName[i], argv[i] ? argv[i] : "NULL");
}
*temp = atoi(argv[0]);
LYINFLOG("The handle is %d\n", *temp);
@@ -626,7 +626,7 @@
return LYNQ_E_APN_DB_FAIL;
}
- LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully\n",__FUNCTION__);
/* Create SQL statement */
sprintf(sql,"SELECT HANDLE from LYNQAPN WHERE ID=%d", (int)profile_idx);
LYINFLOG("sql: %s\n", sql);
@@ -702,7 +702,7 @@
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 1;
}
- LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully\n",__FUNCTION__);
/* Create SQL statement */
sql = "CREATE TABLE LYNQAPN( \
ID INT NOT NULL, \
@@ -723,7 +723,7 @@
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 1;
}
- LYINFLOG("Table LYNQAPN created successfully\n");
+ LYDBGLOG("Table LYNQAPN created successfully\n");
sqlite3_close(apnDb);
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 0;
@@ -736,7 +736,7 @@
}
int *temp = (int *)data;
for(int i=0; i<argc; i++){
- LYINFLOG("[%s]%s = %s", __FUNCTION__,azColName[i], argv[i] ? argv[i] : "NULL");
+ LYDBGLOG("[%s]%s = %s", __FUNCTION__,azColName[i], argv[i] ? argv[i] : "NULL");
}
*temp = atoi(argv[0]);
LYINFLOG("\nThe number is %d\n", *temp);
@@ -758,7 +758,7 @@
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 1;
}
- LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully\n",__FUNCTION__);
/* Create SQL statement */
sql = "SELECT COUNT(*) FROM sqlite_master where type ='table' and name = 'LYNQAPN'";
/* Execute SQL statement */
@@ -771,7 +771,7 @@
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 1;
}
- LYINFLOG("Table LYNQAPN check successfully\n");
+ LYDBGLOG("Table LYNQAPN check successfully\n");
sqlite3_close(apnDb);
pthread_mutex_unlock(&s_qser_data_database_mutex);
if(num <= 0)
@@ -790,6 +790,7 @@
static int init_apn_db()
{
int db_ret=0;
+ int ret = 0;
int check_ret=0;
int table_ret=0;
@@ -801,10 +802,14 @@
table_ret = create_apn_table(APN_DB_PATH);
if(table_ret!=0)
{
- LYERRLOG("create apn table fail!!!");
+ LYERRLOG("ret = %d, create apn table fail!!!", table_ret);
return RESULT_ERROR;
}
- apn_db_add(0, &default_apn);
+ ret = apn_db_add(0, &default_apn);
+ if(ret != 0)
+ {
+ LYERRLOG("ret = %d, apn add fail!!!", ret);
+ }
}
else if(db_ret==APN_DB_READED)
{
@@ -815,10 +820,14 @@
table_ret = create_apn_table(APN_DB_PATH);
if(table_ret!=0)
{
- LYERRLOG("create apn table fail!!!");
+ LYERRLOG("ret = %d, create apn table fail!!!", table_ret);
return 1;
}
- apn_db_add(0, &default_apn);
+ ret = apn_db_add(0, &default_apn);
+ if(ret != 0)
+ {
+ LYERRLOG("ret = %d, apn add fail!!!", ret);
+ }
}
else if(check_ret == APN_TABLE_CREATE)
{
@@ -853,7 +862,7 @@
return LYNQ_E_APN_DB_FAIL;
}
- LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully\n",__FUNCTION__);
/* Create SQL statement */
sprintf(sql,"UPDATE LYNQAPN SET HANDLE=%d", default_handle);
LYINFLOG("sql: %s\n", sql);
@@ -867,7 +876,7 @@
pthread_mutex_unlock(&s_qser_data_database_mutex);
return LYNQ_E_APN_DB_FAIL;
}
- LYINFLOG("clean apn table successfully\n");
+ LYDBGLOG("clean apn table successfully\n");
sqlite3_close(apnDb);
pthread_mutex_unlock(&s_qser_data_database_mutex);
return RESULT_OK;
@@ -883,7 +892,7 @@
memset(apn_indexs,0,sizeof(apn_indexs));
next_index = 0;
- LYINFLOG("index = %p",apn_indexs);
+ LYDBGLOG("index = %p",apn_indexs);
/* Open database */
pthread_mutex_lock(&s_qser_data_database_mutex);
rc = sqlite3_open(APN_DB_PATH, &apnDb);
@@ -895,7 +904,7 @@
}
else
{
- LYINFLOG("Opened database successfully\n");
+ LYDBGLOG("Opened database successfully\n");
}
/* Create SQL statement */
@@ -912,14 +921,14 @@
}
else
{
- LYINFLOG("Operation done successfully\n");
+ LYDBGLOG("Operation done successfully\n");
}
//indexs = temp_index;
- LYINFLOG("index = %p",apn_indexs);
+ LYDBGLOG("index = %p",apn_indexs);
for(count;count<=QSER_APN_MAX_LIST;count++)
{
//if(apn_indexs[count-1]!=count)
- LYINFLOG("apn_indexs[count] = %d, count = %d\n", apn_indexs[count], count);
+ LYDBGLOG("apn_indexs[count] = %d, count = %d\n", apn_indexs[count], count);
if(apn_indexs[count]!=count)
{
//apn_usable=true;
@@ -928,7 +937,7 @@
}
sqlite3_close(apnDb);
pthread_mutex_unlock(&s_qser_data_database_mutex);
- LYINFLOG("count is %d\n", count);
+ LYDBGLOG("count is %d\n", count);
return count;
}
@@ -946,7 +955,7 @@
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 1;
}
- LYINFLOG("[%s] Opened database successfully",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully",__FUNCTION__);
/* Create SQL statement */
/* Execute SQL statement */
LYINFLOG("the profile id is %d\n", profile_id);
@@ -961,7 +970,7 @@
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 1;
}
- LYINFLOG("write apn to apn db successfully");
+ LYDBGLOG("write apn to apn db successfully");
sqlite3_close(apnDb);
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 0;
@@ -987,7 +996,7 @@
return LYNQ_E_APN_DB_FAIL;
}
- LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully\n",__FUNCTION__);
/* Create SQL statement */
sprintf(sql,"DELETE from LYNQAPN WHERE ID=%d",(int)profile_idx);
LYINFLOG("sql: %s\n", sql);
@@ -1026,7 +1035,7 @@
return LYNQ_E_APN_DB_FAIL;
}
- LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully\n",__FUNCTION__);
/* Create SQL statement */
char *sql = sqlite3_mprintf("UPDATE LYNQAPN set PDP_TYPE = %d, AUTH_PROTO = %d, APN_NAME = '%q', USERNAME = '%q', PASSWORD = '%q', APN_TYPE = '%q' WHERE ID=%d", apn->pdp_type, apn->auth_proto, apn->apn_name, apn->username, apn->password, apn->apn_type, apn->profile_idx);
LYINFLOG("sql: %s\n", sql);
@@ -1055,7 +1064,7 @@
}
qser_apn_info_s* temp = (qser_apn_info_s *)data;
for(int i=0; i<argc; i++){
- LYINFLOG("[%s]%s = %s", __FUNCTION__,azColName[i], argv[i] ? argv[i] : "NULL");
+ LYDBGLOG("[%s]%s = %s", __FUNCTION__,azColName[i], argv[i] ? argv[i] : "NULL");
}
temp->profile_idx = atoi(argv[0]);
temp->pdp_type = atoi(argv[1]);
@@ -1087,7 +1096,7 @@
return LYNQ_E_APN_DB_FAIL;
}
- LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully\n",__FUNCTION__);
/* Create SQL statement */
sprintf(sql,"SELECT * from LYNQAPN WHERE ID=%d", (int)profile_idx);
LYINFLOG("sql: %s\n", sql);
@@ -1101,7 +1110,7 @@
pthread_mutex_unlock(&s_qser_data_database_mutex);
return LYNQ_E_APN_DB_FAIL;
}
- LYINFLOG("set apn %d successfully\n",apn->profile_idx);
+ LYDBGLOG("set apn %d successfully\n",apn->profile_idx);
sqlite3_close(apnDb);
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 0;
@@ -1114,7 +1123,7 @@
qser_apn_info_list_s* temp = (qser_apn_info_list_s *)data;
for(i=0; i<argc; i++){
- LYINFLOG("%s = %s", azColName[i], argv[i] ? argv[i] : "NULL");
+ LYDBGLOG("%s = %s", azColName[i], argv[i] ? argv[i] : "NULL");
}
temp->apn[temp->cnt].profile_idx = atoi(argv[0]);
@@ -1145,7 +1154,7 @@
return LYNQ_E_APN_DB_FAIL;
}
- LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ LYDBGLOG("[%s] Opened database successfully\n",__FUNCTION__);
/* Create SQL statement */
sprintf(sql,"SELECT * from LYNQAPN");
LYINFLOG("sql: %s\n", sql);
@@ -1270,7 +1279,7 @@
}
free(apn_table);
apn_table=NULL;
- LYINFLOG("data_call_handle_get end");
+ LYDBGLOG("data_call_handle_get end");
return RESULT_OK;
}
@@ -1308,7 +1317,7 @@
while (s_qser_data_cb_thread_status)
{
ret = lynq_wait_data_call_state_change(&handle);
- LYINFLOG("ret = %d, wait data call state change end!!!\n", ret);
+ LYINFLOG("[thread_wait_cb_status]: ret = %d, handle = %d, wait data call state change end!!!\n", ret, handle);
if(s_qser_data_cb_thread_status == 0)
{
return NULL;
@@ -1318,18 +1327,19 @@
continue;
}
acquire_wake_lock();
- LYINFLOG("[thread_wait_cb_status]: handle = %d", handle);
+ //LYINFLOG("[thread_wait_cb_status]: handle = %d", handle);
memset(&data_urc_info, 0, sizeof(data_urc_info));
memset(&data_cb_state, 0, sizeof(data_cb_state));
lynq_get_data_call_list(&handle,&data_urc_info);
/*compare paramter*/
//data_cb_state.profile_idx = (char)handle;
apn_db_handle_get_profile(handle, &data_cb_state.profile_idx);
- LYINFLOG("[thread_wait_cb_status]: callback profile_idx is %d\n", data_cb_state.profile_idx);
- LYINFLOG("[thread_wait_cb_status]: status=%d, suggestedRetryTime=%d, cid=%d, active=%d, type=%s, ifname=%s, addresses=%s, dnses=%s, gateways=%s, pcscf=%s, mtu=%d\n",
- data_urc_info.status, data_urc_info.suggestedRetryTime, data_urc_info.cid, data_urc_info.active,
- data_urc_info.type, data_urc_info.ifname, data_urc_info.addresses, data_urc_info.dnses, data_urc_info.gateways, data_urc_info.pcscf,
- data_urc_info.mtu);
+ LYINFLOG("[thread_wait_cb_status]: callback profile_idx is %d, status=%d, suggestedRetryTime=%d, cid=%d, active=%d, type=%s, ifname=%s, \n",
+ data_cb_state.profile_idx, data_urc_info.status, data_urc_info.suggestedRetryTime, data_urc_info.cid, data_urc_info.active, data_urc_info.type, data_urc_info.ifname);
+
+ LYINFLOG("[thread_wait_cb_status]: addresses=%s, dnses=%s, gateways=%s, pcscf=%s, mtu=%d\n",
+ data_urc_info.addresses, data_urc_info.dnses, data_urc_info.gateways, data_urc_info.pcscf, data_urc_info.mtu);
+
memcpy(data_cb_state.name,data_urc_info.ifname,strlen(data_urc_info.ifname)+1);
if ((strcmp(data_urc_info.type,"IPV4") == 0) || (strcmp(data_urc_info.type,"IP") == 0))
{
@@ -1646,7 +1656,7 @@
info->ip_family = QSER_DATA_CALL_TYPE_IPV4;
strcpy(info->v4.name,data_call_info.ifname);
datacall_ipv4_status_judge(data_call_info.active,info);
- LYINFLOG("[IPV4]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
+ LYDBGLOG("[IPV4]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
lynq_ipv4_aton_getinfo(&data_call_info,info);
}
else if (strncmp(data_call_info.type,"IPV6", strlen("IPV6") + 1) == 0)
@@ -1654,7 +1664,7 @@
info->ip_family = QSER_DATA_CALL_TYPE_IPV6;
strcpy(info->v6.name,data_call_info.ifname);
datacall_ipv6_status_judge(data_call_info.active,info);
- LYINFLOG("[IPV6]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
+ LYDBGLOG("[IPV6]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
lynq_ipv6_inet_pton_getinfo(&data_call_info,info);
}
else if (strncmp(data_call_info.type,"IPV4V6", strlen("IPV4V6") + 1) == 0)
@@ -1662,13 +1672,13 @@
info->ip_family = QSER_DATA_CALL_TYPE_IPV4V6;
strcpy(info->v4.name,data_call_info.ifname);
datacall_ipv4_status_judge(data_call_info.active,info);
- LYINFLOG("[IPV4V6]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
+ LYDBGLOG("[IPV4V6]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
#ifndef MOBILETEK_TARGET_PLATFORM_T106
lynq_ipv4_aton_getinfo(&data_call_info,info);
#endif
strcpy(info->v6.name,data_call_info.ifname);
datacall_ipv6_status_judge(data_call_info.active,info);
- LYINFLOG("[IPV4V6]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
+ LYDBGLOG("[IPV4V6]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
#ifndef MOBILETEK_TARGET_PLATFORM_T106
lynq_ipv6_inet_pton_getinfo(&data_call_info,info);
#endif
@@ -1938,9 +1948,10 @@
int ret = 0;
int handle = -1;
- LYINFLOG("[%s] entry\n",__FUNCTION__);
+ LYDBGLOG("[%s] entry\n",__FUNCTION__);
if(g_lynq_qser_data_init_flag == 0)
{
+ LYERRLOG("lynq qser data uninit");
return LYNQ_E_NO_INIT;
}
if (profile_idx <= 0 || profile_idx > QSER_APN_MAX_LIST)
@@ -1986,6 +1997,7 @@
{
if(g_lynq_qser_data_init_flag == 0)
{
+ LYERRLOG("lynq qser data uninit");
return LYNQ_E_NO_INIT;
}
if (NULL == apn_list)
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
index bdf4caa..9ad0b0c 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
@@ -873,7 +873,7 @@
int rt = pthread_create(&s_new_network_tid, NULL, new_network_thread_recv, NULL);
if(rt < 0)
{
- LYDBGLOG("%s pthread_create error!!!",__func__);
+ LYERRLOG("%s pthread_create error!!!",__func__);
s_handlerPtr=NULL;
s_contextPtr=NULL;
s_new_network_tid=-1;