From 3c5ada0143425aa0f2ca0ec470cf47072bdf69fd Mon Sep 17 00:00:00 2001 From: Adrian Bowyer Date: Tue, 24 Sep 2013 10:39:33 +0100 Subject: [PATCH] Working on the http code... --- Lwip/lwip/src/sam/netif/ethernetif.c | 43 ++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/Lwip/lwip/src/sam/netif/ethernetif.c b/Lwip/lwip/src/sam/netif/ethernetif.c index 598a3a6..b2d44bc 100644 --- a/Lwip/lwip/src/sam/netif/ethernetif.c +++ b/Lwip/lwip/src/sam/netif/ethernetif.c @@ -376,19 +376,38 @@ static struct pbuf *low_level_input(struct netif *netif) * \param pv_parameters the lwip network interface structure for this * ethernetif. */ + void ethernetif_input(void * pvParameters) { - struct netif *netif = (struct netif *)pvParameters; struct pbuf *p; + /* move received packet into a new pbuf */ + p = low_level_input( netif ); + if( p == NULL ) + return; + + if( ERR_OK != netif->input( p, netif ) ) + { + pbuf_free(p); + p = NULL; + } +} + + +//void ethernetif_input(void * pvParameters) +//{ +// +// struct netif *netif = (struct netif *)pvParameters; +// struct pbuf *p; +// //#ifdef FREERTOS_USED // for( ;; ) { // do { //#endif - /* move received packet into a new pbuf */ - p = low_level_input( netif ); - if( p == NULL ) { +// /* move received packet into a new pbuf */ +// p = low_level_input( netif ); +// if( p == NULL ) { //#ifdef FREERTOS_USED // /* No packet could be read. Wait a for an interrupt to tell us // there is more data available. */ @@ -396,18 +415,18 @@ void ethernetif_input(void * pvParameters) // } // }while( p == NULL ); //#else - return; - } +// return; +// } //#endif - - if( ERR_OK != netif->input( p, netif ) ) { - pbuf_free(p); - p = NULL; - } +// +// if( ERR_OK != netif->input( p, netif ) ) { +// pbuf_free(p); +// p = NULL; +// } //#ifdef FREERTOS_USED // } //#endif -} +//}