Pārlūkot izejas kodu

Update ethernetif.c

if device->eth_rx is NULL ,rx thread will hard fault...
Urey 8 gadi atpakaļ
vecāks
revīzija
8979d70a69
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      components/net/lwip-1.4.1/src/netif/ethernetif.c

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

@@ -367,6 +367,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)
                 {