]> git.sur5r.net Git - freertos/commitdiff
Add an assert in the Win32 lwIP port layer to catch invalid adapter numbers being...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 26 Sep 2011 14:47:08 +0000 (14:47 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 26 Sep 2011 14:47:08 +0000 (14:47 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1614 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/Common/ethernet/lwip-1.4.0/ports/win32/ethernetif.c

index 071e4bfab85e675606519233a4df45164e3097b4..881beb7eabbe2bd32328c201447699de190c58c3 100644 (file)
@@ -453,6 +453,15 @@ struct xEthernetIf *pxEthernetIf;
   \r
                /* initialize the hardware */\r
                prvLowLevelInit( pxNetIf );\r
+\r
+               /* Was an interface opened? */\r
+               if( pxOpenedInterfaceHandle == NULL )\r
+               {\r
+                       /* Probably an invalid adapter number was defined in \r
+                       FreeRTOSConfig.h. */\r
+                       xReturn = ERR_VAL;\r
+                       configASSERT( pxOpenedInterfaceHandle );\r
+               }\r
        }\r
 \r
        return xReturn;\r