mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-03 21:14:40 +08:00
Minor changes (tabs)
This commit is contained in:
parent
e0bf309bb5
commit
885695fa67
@ -413,7 +413,7 @@ lwip_recvfrom(int s, void *mem, int len, unsigned int flags,
|
|||||||
/* No data was left from the previous operation, so we try to get
|
/* No data was left from the previous operation, so we try to get
|
||||||
some from the network. */
|
some from the network. */
|
||||||
sock->lastdata = buf = netconn_recv(sock->conn);
|
sock->lastdata = buf = netconn_recv(sock->conn);
|
||||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: netconn_recv netbuf=%p\n", buf));
|
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom: netconn_recv netbuf=%p\n", buf));
|
||||||
|
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
/* We should really do some error checking here. */
|
/* We should really do some error checking here. */
|
||||||
|
@ -445,19 +445,19 @@ err_t
|
|||||||
tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg)
|
tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg)
|
||||||
{
|
{
|
||||||
struct tcpip_msg *msg;
|
struct tcpip_msg *msg;
|
||||||
|
|
||||||
if (mbox != SYS_MBOX_NULL) {
|
|
||||||
msg = memp_malloc(MEMP_TCPIP_MSG_API);
|
|
||||||
if (msg == NULL) {
|
|
||||||
return ERR_MEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->type = TCPIP_MSG_TIMEOUT;
|
if (mbox != SYS_MBOX_NULL) {
|
||||||
msg->msg.tmo.msecs = msecs;
|
msg = memp_malloc(MEMP_TCPIP_MSG_API);
|
||||||
msg->msg.tmo.h = h;
|
if (msg == NULL) {
|
||||||
msg->msg.tmo.arg = arg;
|
return ERR_MEM;
|
||||||
sys_mbox_post(mbox, msg);
|
}
|
||||||
return ERR_OK;
|
|
||||||
|
msg->type = TCPIP_MSG_TIMEOUT;
|
||||||
|
msg->msg.tmo.msecs = msecs;
|
||||||
|
msg->msg.tmo.h = h;
|
||||||
|
msg->msg.tmo.arg = arg;
|
||||||
|
sys_mbox_post(mbox, msg);
|
||||||
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
return ERR_VAL;
|
return ERR_VAL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user