Add an assert in the Win32 lwIP port layer to catch invalid adapter numbers being used.

This commit is contained in:
Richard Barry 2011-09-26 14:47:08 +00:00
parent 0e7c46fbd3
commit 9c25614cf4

View file

@ -453,6 +453,15 @@ struct xEthernetIf *pxEthernetIf;
/* initialize the hardware */ /* initialize the hardware */
prvLowLevelInit( pxNetIf ); 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; return xReturn;