]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_UDP_IP.c
Fixes to FreeRTOS+UDP trace macro parameters and placements.
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-UDP / FreeRTOS_UDP_IP.c
index 0e69783855751650a680e0420dd8e6dc0482f36a..25f99450bb1f73fba1455d0b5732a0042018c21d 100644 (file)
@@ -5,11 +5,11 @@
  * This file is part of the FreeRTOS+UDP distribution.  The FreeRTOS+UDP license\r
  * terms are different to the FreeRTOS license terms.\r
  *\r
- * FreeRTOS+UDP uses a dual license model that allows the software to be used \r
- * under a standard GPL open source license, or a commercial license.  The \r
- * standard GPL license (unlike the modified GPL license under which FreeRTOS \r
- * itself is distributed) requires that all software statically linked with \r
- * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.  \r
+ * FreeRTOS+UDP uses a dual license model that allows the software to be used\r
+ * under a standard GPL open source license, or a commercial license.  The\r
+ * standard GPL license (unlike the modified GPL license under which FreeRTOS\r
+ * itself is distributed) requires that all software statically linked with\r
+ * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.\r
  * Details of both license options follow:\r
  *\r
  * - Open source licensing -\r
@@ -21,9 +21,9 @@
  *\r
  * - Commercial licensing -\r
  * Businesses and individuals that for commercial or other reasons cannot comply\r
- * with the terms of the GPL V2 license must obtain a commercial license before \r
- * incorporating FreeRTOS+UDP into proprietary software for distribution in any \r
- * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp \r
+ * with the terms of the GPL V2 license must obtain a commercial license before\r
+ * incorporating FreeRTOS+UDP into proprietary software for distribution in any\r
+ * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp\r
  * and do not require any source files to be changed.\r
  *\r
  * FreeRTOS+UDP is distributed in the hope that it will be useful.  You cannot\r
@@ -582,8 +582,8 @@ 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
+\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
@@ -724,7 +724,7 @@ eIPEvent_t eMessage;
        /* This time can be used to send more than one type of message to the IP\r
        task.  The message ID is stored in the ID of the timer.  The strange\r
        casting is to avoid compiler warnings. */\r
-       eMessage = ( eIPEvent_t ) ( ( int ) pvTimerGetTimerID( xTimer ) );\r
+       eMessage = ( eIPEvent_t ) ( ( portBASE_TYPE ) pvTimerGetTimerID( xTimer ) );\r
 \r
        prvSendEventToIPTask( eMessage );\r
 }\r
@@ -1298,7 +1298,7 @@ xARPPacket_t *pxARPPacket;
 \r
        pxNetworkBuffer->xDataLength = sizeof( xARPPacket_t );\r
 \r
-       iptraceCREATING_ARP_REQUEST( ulIPAddress );\r
+       iptraceCREATING_ARP_REQUEST( pxNetworkBuffer->ulIPAddress );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -1403,7 +1403,7 @@ static void prvProcessNetworkDownEvent( void )
                        /* Static configuration is being used, so the network is now up. */\r
                        #if ipconfigFREERTOS_PLUS_NABTO == 1\r
                        {\r
-                               /* Return value is used in configASSERT() inside the \r
+                               /* Return value is used in configASSERT() inside the\r
                                function. */\r
                                ( void ) xStartNabtoTask();\r
                        }\r
@@ -1594,7 +1594,7 @@ uint16_t usLength, usReturn;
        }\r
        else\r
        {\r
-               /* The hardware will check the checksum.  Returning 0 allows this \r
+               /* The hardware will check the checksum.  Returning 0 allows this\r
                function to be used to both check an incoming checksum and set an\r
                outgoing checksum in this case. */\r
                usReturn = 0;\r
@@ -1660,11 +1660,11 @@ uint16_t usLength, usReturn;
        xICMPHeader_t *pxICMPHeader;\r
        xIPHeader_t *pxIPHeader;\r
 \r
-               iptraceSENDING_PING_REPLY( pxIPHeader->ulSourceIPAddress );\r
-\r
                pxICMPHeader = &( pxICMPPacket->xICMPHeader );\r
                pxIPHeader = &( pxICMPPacket->xIPHeader );\r
 \r
+               iptraceSENDING_PING_REPLY( pxIPHeader->ulSourceIPAddress );\r
+\r
                /* The checksum can be checked here - but a ping reply should be\r
                returned even if the checksum is incorrect so the other end can\r
                tell that the ping was received - even if the ping reply contains\r
@@ -1763,7 +1763,7 @@ uint16_t us, usDataLength16BitWords, *pusNextData, usReturn;
                {\r
                        ulChecksum = ( ulChecksum & 0xffffUL ) + ( ulChecksum >> 16UL );\r
                }\r
-               \r
+\r
                usReturn = ~( ( uint16_t ) ulChecksum );\r
        }\r
        else\r