]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPClientTask.c
Update FreeRTOS+ more demos that use FreeRTOS+CLI to remove casting to int8_t * from...
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_CyaSSL_Windows_Simulator / SecureTCPClientTask.c
index 309877ef2fb53c01005078278b19666b4fe0000e..3c87c1bb568b1da9ad35f65da022b67c8c2e5f2e 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
@@ -94,7 +94,7 @@ struct sockaddr_in xConnection;
 CYASSL* xCyaSSL_Object;\r
 WORD wVersionRequested;\r
 WSADATA xWSAData;\r
-uint8_t cString[ 50 ];\r
+char cString[ 50 ];\r
 portBASE_TYPE lReturned;\r
 uint32_t ulCount = 0UL;\r
 \r
@@ -128,13 +128,13 @@ uint32_t ulCount = 0UL;
                /* Connect to the secure server. */\r
                if( connect( xClientSocket, ( SOCKADDR * ) &xConnection, sizeof( xConnection ) ) == 0 )\r
                {\r
-                       /* The connect was successful.  Create a CyaSSL object to associate \r
+                       /* The connect was successful.  Create a CyaSSL object to associate\r
                        with this connection. */\r
                        xCyaSSL_Object = CyaSSL_new( xCyaSSL_ClientContext );\r
-        \r
+\r
                        if( xCyaSSL_Object != NULL )\r
                        {\r
-                               /* Associate the created CyaSSL object with the connected \r
+                               /* Associate the created CyaSSL object with the connected\r
                                socket. */\r
                                lReturned = CyaSSL_set_fd( xCyaSSL_Object, xClientSocket );\r
                                configASSERT( lReturned == SSL_SUCCESS );\r
@@ -146,14 +146,14 @@ uint32_t ulCount = 0UL;
                                do\r
                                {\r
                                        /* Create the string that is sent to the secure server. */\r
-                                       sprintf( ( char * ) cString, "Message number %lu\r\n", ulCount );\r
+                                       sprintf( cString, "Message number %lu\r\n", ulCount );\r
 \r
-                                       /* The next line is the secure equivalent of the standard \r
+                                       /* The next line is the secure equivalent of the standard\r
                                        sockets call:\r
                                        lReturned = send( xClientSocket, cString, strlen( cString ) + 1, 0 ); */\r
-                                       lReturned = CyaSSL_write( xCyaSSL_Object, ( const char * ) cString, strlen( ( const char * ) cString ) + 1 );\r
-                                       \r
-                                       \r
+                                       lReturned = CyaSSL_write( xCyaSSL_Object, cString, strlen( cString ) + 1 );\r
+\r
+\r
                                        /* Short delay to prevent the messages streaming up the\r
                                        console too quickly. */\r
                                        vTaskDelay( 50 );\r
@@ -161,7 +161,7 @@ uint32_t ulCount = 0UL;
 \r
                                } while( ( lReturned != SOCKET_ERROR ) && ( ulCount < 10UL ) );\r
                        }\r
-                                               \r
+\r
                        CyaSSL_free( xCyaSSL_Object );\r
                        closesocket( xClientSocket );\r
 \r