From: richardbarry Date: Mon, 26 Sep 2011 14:47:08 +0000 (+0000) Subject: Add an assert in the Win32 lwIP port layer to catch invalid adapter numbers being... X-Git-Tag: V7.1.0~46 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5cd19c526f39e4c098b879b2eaddd3fa1d4ab070;p=freertos Add an assert in the Win32 lwIP port layer to catch invalid adapter numbers being used. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1614 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c b/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c index 071e4bfab..881beb7ea 100644 --- a/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c +++ b/Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c @@ -453,6 +453,15 @@ struct xEthernetIf *pxEthernetIf; /* initialize the hardware */ prvLowLevelInit( pxNetIf ); + + /* Was an interface opened? */ + if( pxOpenedInterfaceHandle == NULL ) + { + /* Probably an invalid adapter number was defined in + FreeRTOSConfig.h. */ + xReturn = ERR_VAL; + configASSERT( pxOpenedInterfaceHandle ); + } } return xReturn;