From 7fbb5fc82aa47acbaf57e0224c31db813050023a Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 17 Mar 2016 09:31:50 +0100 Subject: [PATCH] Fix netconn API in core locking mode --- src/api/tcpip.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 3ab76ecf..6ea8abf3 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -327,15 +327,15 @@ tcpip_untimeout(sys_timeout_handler h, void *arg) err_t tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem) { - LWIP_ASSERT("semaphore not initialized", sys_sem_valid(sem)); - #if LWIP_TCPIP_CORE_LOCKING + LWIP_UNUSED_ARG(sem); LOCK_TCPIP_CORE(); fn(apimsg); UNLOCK_TCPIP_CORE(); - sys_arch_sem_wait(sem, 0); return ERR_OK; #else /* LWIP_TCPIP_CORE_LOCKING */ + LWIP_ASSERT("semaphore not initialized", sys_sem_valid(sem)); + if (sys_mbox_valid_val(mbox)) { TCPIP_MSG_VAR_DECLARE(msg); @@ -362,7 +362,8 @@ tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t* sem) * @param call Call parameters * @return Return value from tcpip_api_call_fn */ -err_t tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call *call) +err_t +tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call *call) { #if LWIP_TCPIP_CORE_LOCKING err_t err;