diff --git a/src/api/api_lib.c b/src/api/api_lib.c index 3a87c297..abf4edb0 100644 --- a/src/api/api_lib.c +++ b/src/api/api_lib.c @@ -85,10 +85,8 @@ netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg) apimsg->op_completed_sem = LWIP_NETCONN_THREAD_SEM_GET(); #endif /* LWIP_NETCONN_SEM_PER_THREAD */ - if (tcpip_send_msg_wait_sem(fn, apimsg, LWIP_API_MSG_SEM(apimsg)) == ERR_OK) { - return apimsg->err; - } - return ERR_VAL; + tcpip_send_msg_wait_sem(fn, apimsg, LWIP_API_MSG_SEM(apimsg)); + return apimsg->err; } /** @@ -398,7 +396,7 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn) /* Let the stack know that we have accepted the connection. */ API_MSG_VAR_ALLOC_DONTFAIL(msg); API_MSG_VAR_REF(msg).conn = newconn; - /* don't care for the return value of lwip_netconn_do_recv */ + /* don't care for the return value of lwip_netconn_do_accepted */ netconn_apimsg(lwip_netconn_do_accepted, &API_MSG_VAR_REF(msg)); API_MSG_VAR_FREE(msg); #endif /* TCP_LISTEN_BACKLOG */ diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 14ab29c0..a4507918 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -314,9 +314,8 @@ tcpip_untimeout(sys_timeout_handler h, void *arg) * @param fn function to be called from TCPIP thread * @param apimsg argument to API function * @param sem semaphore to wait on - * @return ERR_OK if the function was called, another err_t if not */ -err_t +void tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem) { #if LWIP_TCPIP_CORE_LOCKING @@ -324,7 +323,6 @@ tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem) LOCK_TCPIP_CORE(); fn(apimsg); UNLOCK_TCPIP_CORE(); - return ERR_OK; #else /* LWIP_TCPIP_CORE_LOCKING */ LWIP_ASSERT("semaphore not initialized", sys_sem_valid(sem)); @@ -339,7 +337,6 @@ tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem) sys_mbox_post(&mbox, &TCPIP_MSG_VAR_REF(msg)); sys_arch_sem_wait(sem, 0); TCPIP_MSG_VAR_FREE(msg); - return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING */ } diff --git a/src/include/lwip/priv/tcpip_priv.h b/src/include/lwip/priv/tcpip_priv.h index c754e3d0..278c1103 100644 --- a/src/include/lwip/priv/tcpip_priv.h +++ b/src/include/lwip/priv/tcpip_priv.h @@ -92,7 +92,7 @@ struct netif; #define API_MSG_M_DEF_C(t, m) const t * m #endif /* LWIP_MPU_COMPATIBLE */ -err_t tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem); +void tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem); struct tcpip_api_call_data {