summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con/ecore_con.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_con/ecore_con.c')
-rw-r--r--src/lib/ecore_con/ecore_con.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 0bf16c0a30..d4b50f4c8f 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -2137,7 +2137,8 @@ _ecore_con_cl_read(Ecore_Con_Server *obj)
2137 if (svr->ecs_state || !(svr->type & ECORE_CON_SSL)) 2137 if (svr->ecs_state || !(svr->type & ECORE_CON_SSL))
2138 { 2138 {
2139 errno = 0; 2139 errno = 0;
2140 num = read(svr->fd, buf, sizeof(buf)); 2140 num = recv(svr->fd, (char *)buf, sizeof(buf), 0);
2141
2141 /* 0 is not a valid return value for a tcp socket */ 2142 /* 0 is not a valid return value for a tcp socket */
2142 if ((num > 0) || ((num < 0) && (errno == EAGAIN))) 2143 if ((num > 0) || ((num < 0) && (errno == EAGAIN)))
2143 lost_server = EINA_FALSE; 2144 lost_server = EINA_FALSE;
@@ -2189,7 +2190,7 @@ _ecore_con_cl_handler(void *data,
2189 { 2190 {
2190 char buf[READBUFSIZ]; 2191 char buf[READBUFSIZ];
2191 ssize_t len; 2192 ssize_t len;
2192 len = recv(svr->fd, buf, sizeof(buf), MSG_DONTWAIT | MSG_PEEK); 2193 len = recv(svr->fd, (char *)buf, sizeof(buf), MSG_DONTWAIT | MSG_PEEK);
2193 DBG("%zu bytes in buffer", len); 2194 DBG("%zu bytes in buffer", len);
2194 } 2195 }
2195#endif 2196#endif
@@ -2246,7 +2247,7 @@ _ecore_con_cl_udp_handler(void *data,
2246 return ECORE_CALLBACK_RENEW; 2247 return ECORE_CALLBACK_RENEW;
2247 } 2248 }
2248 2249
2249 num = read(svr->fd, buf, READBUFSIZ); 2250 num = recv(svr->fd, (char *)buf, READBUFSIZ, 0);
2250 2251
2251 if ((!svr->delete_me) && (num > 0)) 2252 if ((!svr->delete_me) && (num > 0))
2252 ecore_con_event_server_data(obj, buf, num, EINA_TRUE); 2253 ecore_con_event_server_data(obj, buf, num, EINA_TRUE);
@@ -2353,7 +2354,8 @@ _ecore_con_svr_cl_read(Ecore_Con_Client *obj)
2353 Ecore_Con_Server_Data *host_server = eo_data_scope_get(cl->host_server, ECORE_CON_SERVER_CLASS); 2354 Ecore_Con_Server_Data *host_server = eo_data_scope_get(cl->host_server, ECORE_CON_SERVER_CLASS);
2354 if (!(host_server->type & ECORE_CON_SSL) && (!cl->upgrade)) 2355 if (!(host_server->type & ECORE_CON_SSL) && (!cl->upgrade))
2355 { 2356 {
2356 num = read(cl->fd, buf, sizeof(buf)); 2357 num = recv(cl->fd, (char *)buf, sizeof(buf), 0);
2358
2357 /* 0 is not a valid return value for a tcp socket */ 2359 /* 0 is not a valid return value for a tcp socket */
2358 if ((num > 0) || ((num < 0) && ((errno == EAGAIN) || (errno == EINTR)))) 2360 if ((num > 0) || ((num < 0) && ((errno == EAGAIN) || (errno == EINTR))))
2359 lost_client = EINA_FALSE; 2361 lost_client = EINA_FALSE;