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

pull/4/head
Richard Barry 14 years ago
parent 0e7c46fbd3
commit 9c25614cf4

@ -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;

Loading…
Cancel
Save