mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 05:10:40 +00:00
Minor fix (spaces, indent) and check for LWIP_SO_RCVTIMEO..
This commit is contained in:
parent
2ff620e1b5
commit
d1ef610822
@ -490,13 +490,12 @@ netconn_recv(struct netconn *conn)
|
||||
|
||||
sys_arch_mbox_fetch(conn->recvmbox, (void *)&p, 0);
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (p != NULL) {
|
||||
len = p->tot_len;
|
||||
conn->recv_avail -= len;
|
||||
}
|
||||
else
|
||||
} else {
|
||||
len = 0;
|
||||
}
|
||||
|
||||
/* Register event with callback */
|
||||
if (conn->callback)
|
||||
@ -529,12 +528,14 @@ netconn_recv(struct netconn *conn)
|
||||
} else {
|
||||
#if (LWIP_UDP || LWIP_RAW)
|
||||
#if LWIP_SO_RCVTIMEO
|
||||
sys_arch_mbox_fetch(conn->recvmbox, (void *)&buf, conn->recv_timeout);
|
||||
if (sys_arch_mbox_fetch(conn->recvmbox, (void *)&buf, conn->recv_timeout)==SYS_ARCH_TIMEOUT) {
|
||||
buf = NULL;
|
||||
}
|
||||
#else
|
||||
sys_arch_mbox_fetch(conn->recvmbox, (void *)&buf, 0);
|
||||
#endif /* LWIP_SO_RCVTIMEO*/
|
||||
if (buf!=NULL)
|
||||
{ conn->recv_avail -= buf->p->tot_len;
|
||||
if (buf!=NULL) {
|
||||
conn->recv_avail -= buf->p->tot_len;
|
||||
/* Register event with callback */
|
||||
if (conn->callback)
|
||||
(*conn->callback)(conn, NETCONN_EVT_RCVMINUS, buf->p->tot_len);
|
||||
|
Loading…
Reference in New Issue
Block a user