1
0
Эх сурвалжийг харах

[lwip]判定eth_rx是否为空,为空不执行。

tangyuxin 7 жил өмнө
parent
commit
28855d4fb5

+ 2 - 0
components/net/lwip-2.0.2/src/netif/ethernetif.c

@@ -391,6 +391,8 @@ static void eth_rx_thread_entry(void* parameter)
             /* receive all of buffer */
             while (1)
             {
+                if(device->eth_rx == RT_NULL) break;
+                
                 p = device->eth_rx(&(device->parent));
                 if (p != RT_NULL)
                 {