From 9809f1ff6600466da3f96fb304791201c54b34fc Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Wed, 24 Apr 2013 21:38:01 +0200 Subject: [PATCH] Fixed bug #38586 --- CHANGELOG | 3 +++ src/core/netif.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 685b5687..3f75c1ae 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -80,6 +80,9 @@ HISTORY ++ Bugfixes: + 2013-04-24: Simon Goldschmidt (patch by Emil Ljungdahl): + * netif.c: fixed bug #38586 netif_loop_output() "deadlocks" + 2013-01-15: Simon Goldschmidt * ip4.c: fixed bug #37665 ip_canforward operates on address in wrong byte order diff --git a/src/core/netif.c b/src/core/netif.c index f8133f76..e7a87c3c 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -719,7 +719,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p, for (last = r; last->next != NULL; last = last->next); SYS_ARCH_PROTECT(lev); - if(netif->loop_first != NULL) { + if (netif->loop_first != NULL) { LWIP_ASSERT("if first != NULL, last must also be != NULL", netif->loop_last != NULL); netif->loop_last->next = r; netif->loop_last = last; @@ -735,7 +735,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p, #if LWIP_NETIF_LOOPBACK_MULTITHREADING /* For multithreading environment, schedule a call to netif_poll */ - tcpip_callback((tcpip_callback_fn)netif_poll, netif); + tcpip_callback_with_block((tcpip_callback_fn)netif_poll, netif, 0); #endif /* LWIP_NETIF_LOOPBACK_MULTITHREADING */ return ERR_OK;