[Bugfix][T106][bug-view-62]change log level and add log for sdk-ready
Only Configure: No
Affected branch: master
Affected module: network
Is it affected on both ZXIC and MTK: only zxic
Self-test: Yes
Doc Update: No
Change-Id: I5ebb1f23e657da6f86efcb8606b25b71cad80b42
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp b/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp
index b1d4c23..2b6874b 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-sdk-ready/lynq_timer.cpp
@@ -159,7 +159,7 @@
timeOut.tv_usec = 0;
if (setsockopt(sock_fd, SOL_SOCKET, SO_RCVTIMEO, &timeOut, sizeof(timeOut)) < 0)
{
- RLOGD("__FUNCTION__ %s time out setting failed %s\n", __FUNCTION__, strerror(errno));
+ RLOGE("__FUNCTION__ %s time out setting failed %s\n", __FUNCTION__, strerror(errno));
/*set uci*/
/*socket abnormal*/
lynq_set_section("sdk_ready", "3");
@@ -193,7 +193,7 @@
RLOGD("send_num %d\n", send_num);
if(send_num == 0)
{
- RLOGD("__FUNCTION__ %s Close to end %s\n", __FUNCTION__, strerror(errno));
+ RLOGE("__FUNCTION__ %s Close to end %s\n", __FUNCTION__, strerror(errno));
//unknow
lynq_set_section("sdk_ready", "4");
pthread_mutex_unlock(&g_lynq_sim_sendto_mutex);
@@ -201,7 +201,7 @@
}
if(send_num < 0)
{
- RLOGD("__FUNCTION__ %s sendto error %s\n", __FUNCTION__, strerror(errno));
+ RLOGE("__FUNCTION__ %s sendto error %s\n", __FUNCTION__, strerror(errno));
//unknow
lynq_set_section("sdk_ready", "4");
pthread_mutex_unlock(&g_lynq_sim_sendto_mutex);
@@ -213,15 +213,14 @@
RLOGD("recv_num %d\n", recv_num);
if(recv_num == 0)
{
- RLOGD("__FUNCTION__ %s Close to end\n", __FUNCTION__);
+ RLOGE("__FUNCTION__ %s Close to end\n", __FUNCTION__);
//unknow
lynq_set_section("sdk_ready", "4");
pthread_mutex_unlock(&g_lynq_sim_sendto_mutex);
- continue;;
+ continue;
}
if(recv_num == -1 && errno == EAGAIN)
{
- RLOGD("__FUNCTION__ %srecvfrom fail because timeout\n", __FUNCTION__);
/*set uci*/
#ifdef MOBILETEK_TARGET_PLATFORM_T800
if(!get_md_sta())
@@ -254,20 +253,24 @@
#ifdef MOBILETEK_TARGET_PLATFORM_T106
if(!t106_check_service("lynq-ril-service"))//not find,must be socket error
{
- //unknow error
+ RLOGE("lynq-ril-service no exist\n");
lynq_set_section("sdk_ready", "4");
}
+ else
+ {
+ RLOGE("__FUNCTION__ %s recvfrom fail because timeout\n", __FUNCTION__);
+ lynq_set_section("sdk_ready", "3");
+ }
#endif
pthread_mutex_unlock(&g_lynq_sim_sendto_mutex);
- continue;;
+ continue;
}
if(recv_num < 0)
{
- RLOGD("__FUNCTION__ %srecvfrom fail %s\n", __FUNCTION__, strerror(errno));
- //unknow
+ RLOGE("__FUNCTION__ %s sendto error %s\n", __FUNCTION__, strerror(errno));
lynq_set_section("sdk_ready", "4");
pthread_mutex_unlock(&g_lynq_sim_sendto_mutex);
- continue;;
+ continue;
}
Parcel p;
p.setData((uint8_t *)res_data,sizeof(char)*recv_num);
@@ -283,15 +286,17 @@
/*judge the res_error*/
if(!res_error)
{
-
lynq_set_section("sdk_ready", "0");
+ RLOGE("sdk_ready = 0\n");
}
else
{
//Md configurations are inconsistent with AP configurations
+ RLOGE("__FUNCTION__ %s res_error %d\n", __FUNCTION__, res_error);
lynq_set_section("sdk_ready", "2");
+ pthread_mutex_unlock(&g_lynq_sim_sendto_mutex);
+ continue;
}
- RLOGD("__FUNCTION__ %s res_error %d\n", __FUNCTION__, res_error);
/*judge the res_error*/
pthread_mutex_unlock(&g_lynq_sim_sendto_mutex);
sleep(TIMER);