diff --git a/src/api/api_lib.c b/src/api/api_lib.c index b8679a71..acf6736a 100644 --- a/src/api/api_lib.c +++ b/src/api/api_lib.c @@ -500,7 +500,7 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn) NETCONN_MBOX_WAITING_INC(conn); if (netconn_is_nonblocking(conn)) { - if (sys_arch_mbox_tryfetch(&conn->acceptmbox, &accept_ptr) == SYS_ARCH_TIMEOUT) { + if (sys_arch_mbox_tryfetch(&conn->acceptmbox, &accept_ptr) == SYS_MBOX_EMPTY) { API_MSG_VAR_FREE_ACCEPT(msg); NETCONN_MBOX_WAITING_DEC(conn); return ERR_WOULDBLOCK; @@ -597,7 +597,7 @@ netconn_recv_data(struct netconn *conn, void **new_buf, u8_t apiflags) NETCONN_MBOX_WAITING_INC(conn); if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) || (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) { - if (sys_arch_mbox_tryfetch(&conn->recvmbox, &buf) == SYS_ARCH_TIMEOUT) { + if (sys_arch_mbox_tryfetch(&conn->recvmbox, &buf) == SYS_MBOX_EMPTY) { err_t err; NETCONN_MBOX_WAITING_DEC(conn); err = netconn_err(conn); diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 743553a5..a7e312a2 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -217,7 +217,7 @@ tcpip_thread_poll_one(void) int ret = 0; struct tcpip_msg *msg; - if (sys_arch_mbox_tryfetch(&tcpip_mbox, (void **)&msg) != SYS_ARCH_TIMEOUT) { + if (sys_arch_mbox_tryfetch(&tcpip_mbox, (void **)&msg) != SYS_MBOX_EMPTY) { LOCK_TCPIP_CORE(); if (msg != NULL) { tcpip_thread_handle_msg(msg);