]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_UDP_IP.c
Change version numbers in preparation for V7.6.0 release.
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-UDP / FreeRTOS_UDP_IP.c
index 9d70bb1addd4e77fda2bb6c54f55b050da3af6de..f85b96cbb4210b36b58c5a673a0a6537d245c450 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
- * FreeRTOS+UDP V1.0.0 (C) 2013 Real Time Engineers ltd.\r
+ * FreeRTOS+UDP V1.0.2 (C) 2013 Real Time Engineers ltd.\r
+ * All rights reserved\r
  *\r
  * This file is part of the FreeRTOS+UDP distribution.  The FreeRTOS+UDP license\r
  * terms are different to the FreeRTOS license terms.\r
@@ -581,6 +582,10 @@ static portBASE_TYPE xReturn = pdFALSE;
                                #else\r
                                {\r
                                        *ipLOCAL_IP_ADDRESS_POINTER = xNetworkAddressing.ulDefaultIPAddress;\r
+                                       \r
+                                       /* Ensure the gateway is on the same subnet as the IP \r
+                                       address. */\r
+                                       configASSERT( ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) == ( xNetworkAddressing.ulGatewayAddress & xNetworkAddressing.ulNetMask ) );\r
                                }\r
                                #endif /* ipconfigUSE_DHCP == 1 */\r
 \r
@@ -1355,7 +1360,7 @@ static void prvProcessNetworkDownEvent( void )
                /* The first network down event is generated by the IP stack\r
                itself to initialise the network hardware, so do not call the\r
                network down event the first time through. */\r
-               if( xCallEventHook == pdFALSE )\r
+               if( xCallEventHook == pdTRUE )\r
                {\r
                        vApplicationIPNetworkEventHook( eNetworkDown );\r
                }\r
@@ -1398,7 +1403,9 @@ static void prvProcessNetworkDownEvent( void )
                        /* Static configuration is being used, so the network is now up. */\r
                        #if ipconfigFREERTOS_PLUS_NABTO == 1\r
                        {\r
-                               vStartNabtoTask();\r
+                               /* Return value is used in configASSERT() inside the \r
+                               function. */\r
+                               ( void ) xStartNabtoTask();\r
                        }\r
                        #endif /* ipconfigFREERTOS_PLUS_NABTO */\r
                }\r