]> git.sur5r.net Git - freertos/commitdiff
Fixes to FreeRTOS+UDP trace macro parameters and placements.
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 25 Jan 2014 09:50:28 +0000 (09:50 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 25 Jan 2014 09:50:28 +0000 (09:50 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2180 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_UDP_IP.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_Sockets.h

index e5a3f8579f879529b4308f22c909c8f0a21b5067..fd157c9e2d43dd5c36d998d56caf555e5df731cd 100644 (file)
@@ -70,7 +70,7 @@ port number. */
 \r
 /* xWaitingPacketSemaphore is not created until the socket is bound, so can be\r
 tested to see if bind() has been called. */\r
-#define socketSOCKET_IS_BOUND( pxSocket ) ( ( uint32_t ) pxSocket->xWaitingPacketSemaphore )\r
+#define socketSOCKET_IS_BOUND( pxSocket ) ( ( portBASE_TYPE ) pxSocket->xWaitingPacketSemaphore )\r
 \r
 /* If FreeRTOS_sendto() is called on a socket that is not bound to a port\r
 number then, depending on the FreeRTOSIPConfig.h settings, it might be that a\r
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
index 103a46a4ab0aab24119effca87086a1621aac513..e8a62d089a62d5dd3a0c1face392d4d80e093b34 100644 (file)
@@ -107,10 +107,10 @@ struct freertos_sockaddr
 #if ipconfigBYTE_ORDER == FREERTOS_LITTLE_ENDIAN\r
 \r
        #define FreeRTOS_inet_addr_quick( ucOctet0, ucOctet1, ucOctet2, ucOctet3 )                              \\r
-                                                                               ( ( ( uint32_t ) ( ucOctet3 ) ) << 24UL ) |                     \\r
-                                                                               ( ( ( uint32_t ) ( ucOctet2 ) ) << 16UL ) |                     \\r
-                                                                               ( ( ( uint32_t ) ( ucOctet1 ) ) <<  8UL ) |                     \\r
-                                                                               ( ( uint32_t ) ( ucOctet0 ) )\r
+                                                                               ( ( ( ( uint32_t ) ( ucOctet3 ) ) << 24UL ) |           \\r
+                                                                                 ( ( ( uint32_t ) ( ucOctet2 ) ) << 16UL ) |           \\r
+                                                                                 ( ( ( uint32_t ) ( ucOctet1 ) ) <<  8UL ) |           \\r
+                                                                                 ( ( uint32_t ) ( ucOctet0 ) ) )\r
 \r
        #define FreeRTOS_inet_ntoa( ulIPAddress, pucBuffer )                                                                    \\r
                                                                                sprintf( ( char * ) ( pucBuffer ), "%d.%d.%d.%d",       \\r
@@ -122,17 +122,17 @@ struct freertos_sockaddr
 #else /* ipconfigBYTE_ORDER */\r
 \r
        #define FreeRTOS_inet_addr_quick( ucOctet0, ucOctet1, ucOctet2, ucOctet3 )                              \\r
-                                                                               ( ( ( uint32_t ) ( ucOctet0 ) ) << 24UL ) |                     \\r
-                                                                               ( ( ( uint32_t ) ( ucOctet1 ) ) << 16UL ) |                     \\r
-                                                                               ( ( ( uint32_t ) ( ucOctet2 ) ) <<  8UL ) |                     \\r
-                                                                               ( ( uint32_t ) ( ucOctet3 ) )\r
+                                                                               ( ( ( ( uint32_t ) ( ucOctet0 ) ) << 24UL ) |           \\r
+                                                                                 ( ( ( uint32_t ) ( ucOctet1 ) ) << 16UL ) |           \\r
+                                                                                 ( ( ( uint32_t ) ( ucOctet2 ) ) <<  8UL ) |           \\r
+                                                                                 ( ( uint32_t ) ( ucOctet3 ) ) )\r
 \r
        #define FreeRTOS_inet_ntoa( ulIPAddress, pucBuffer )                                                                    \\r
                                                                                sprintf( ( char * ) ( pucBuffer ), "%d.%d.%d.%d",       \\r
-                                                                                       ( ( ( ulIPAddress ) >> 24UL ) & 0xffUL ) ),             \\r
+                                                                                       ( ( ( ulIPAddress ) >> 24UL ) & 0xffUL ),               \\r
                                                                                        ( ( ( ulIPAddress ) >> 16UL ) & 0xffUL ),               \\r
                                                                                        ( ( ( ulIPAddress ) >> 8UL ) & 0xffUL ),                \\r
-                                                                                       ( ( ulIPAddress ) & 0xffUL )\r
+                                                                                       ( ( ulIPAddress ) & 0xffUL ) )\r
 \r
 #endif /* ipconfigBYTE_ORDER */\r
 \r