[BUGFIX]API-45 and remove streeor\perror
Change-Id: Ibee2e67ffad4c8c2fb2c50d6a3dcb7afedea4281
diff --git a/src/lynq/lib/liblynq-call/lynq_call.cpp b/src/lynq/lib/liblynq-call/lynq_call.cpp
index 1f71165..0b4ae92 100755
--- a/src/lynq/lib/liblynq-call/lynq_call.cpp
+++ b/src/lynq/lib/liblynq-call/lynq_call.cpp
@@ -132,7 +132,7 @@
ret = sendto(sockfd, client_tmp, client_size, 0, (struct sockaddr *)&addr_serv, len_addr_serv);
if(ret==-1)
{
- LYERRLOG("write error:%s",strerror(errno));
+ LYERRLOG("sendto error\n");
return -1;
}
return 0;
@@ -147,7 +147,7 @@
len = recvfrom(sockfd,recvline,LYNQ_REC_BUF, 0, (struct sockaddr *)&addr_serv,(socklen_t*)&len_addr_serv);
if(len == -1)
{
- LYERRLOG("read error:%s",strerror(errno));
+ LYERRLOG("recvfrom error\n");
return -1;
}
if (recvline != NULL) {
@@ -184,7 +184,6 @@
if(send_request(lynq_call_client_sockfd,&client)==-1)
{
LYERRLOG("send request fail");
- perror("[LYNQ_CALL] send request fail:");
return -1;
}
get_response(lynq_call_client_sockfd,p);
@@ -433,7 +432,7 @@
lynq_call_client_sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if(connect(lynq_call_client_sockfd, (struct sockaddr *)&lynq_socket_server_addr, sizeof(lynq_socket_server_addr)) == -1)
{
- LYERRLOG("connect error:%s",strerror(errno));
+ LYERRLOG("connect error\n");
return -1;
}
#endif
@@ -486,7 +485,7 @@
len = recvfrom(socket_fd,urc_data,LYNQ_REC_BUF,0,(struct sockaddr *)&dest_addr,&addr_len);
if(len <= 0)
{
- LYERRLOG("thread_urc_recv step2 fail:%s",strerror(errno));
+ LYERRLOG("thread_urc_recv step2 fail\n");
break;
}
LYDBGLOG("=====>urc data len<=====:%d\n",len);
@@ -546,7 +545,7 @@
socket_fd = socket(AF_INET,SOCK_DGRAM,0);
if(socket_fd < 0)
{
- LYERRLOG("creaet socket for udp fail:%s",strerror(errno));
+ LYERRLOG("creaet socket for udp fail\n");
return -1;
}
urc_local_addr.sin_family = AF_INET;
@@ -556,15 +555,13 @@
rt = setsockopt(socket_fd,SOL_SOCKET,SO_REUSEADDR,&on,sizeof on);
if(rt<0)
{
- LYERRLOG("SO_REUSEADDR fail:%s",strerror(errno));
- perror("SO_REUSEADDR fail:");
+ LYERRLOG("SO_REUSEADDR fail\n");
return -1;
}
rt = bind(socket_fd ,(struct sockaddr*)&urc_local_addr, sizeof(urc_local_addr));
if (rt == -1)
{
LYERRLOG("bind failed");
- perror("bind failed:");
return -1;
}
pthread_attr_init(&attr);
@@ -668,7 +665,6 @@
if(send_request(lynq_call_client_sockfd,&client)==-1)
{
LYERRLOG("send request fail");
- perror("[LYNQ_CALL] send request fail:");
return -1;
}
get_response(lynq_call_client_sockfd,p);
@@ -705,7 +701,6 @@
if(send_request(lynq_call_client_sockfd,&client)==-1)
{
LYERRLOG("send request fail");
- perror("[LYNQ_CALL] send request fail:");
return -1;
}
get_response(lynq_call_client_sockfd,p);
@@ -739,7 +734,6 @@
if(send_request(lynq_call_client_sockfd,&client)==-1)
{
LYERRLOG("send request fail");
- perror("[LYNQ_CALL] send request fail:");
return -1;
}
get_response(lynq_call_client_sockfd,p);
@@ -767,7 +761,6 @@
if(send_request(lynq_call_client_sockfd,&client)==-1)
{
LYERRLOG("send request fail");
- perror("[LYNQ_CALL] send request fail:");
return -1;
}
get_response(lynq_call_client_sockfd,p);
@@ -810,7 +803,6 @@
if(send_request(lynq_call_client_sockfd,&client)==-1)
{
LYERRLOG("send request fail");
- perror("[LYNQ_CALL] send request fail:");
return -1;
}
get_response(lynq_call_client_sockfd,p);
@@ -851,7 +843,6 @@
if(send_request(lynq_call_client_sockfd,&client)==-1)
{
LYERRLOG("send request fail");
- perror("[LYNQ_CALL] send request fail:");
return -1;
}
get_response(lynq_call_client_sockfd,p);
@@ -881,7 +872,6 @@
if(send_request(lynq_call_client_sockfd,&client)==-1)
{
LYERRLOG("send request fail");
- perror("[LYNQ_CALL] send request fail:");
return -1;
}
get_response(lynq_call_client_sockfd,p);
@@ -923,7 +913,6 @@
if(send_request(lynq_call_client_sockfd,&client)==-1)
{
LYERRLOG("send request fail");
- perror("[LYNQ_CALL] send request fail:");
return -1;
}
get_response(lynq_call_client_sockfd,p);