]> git.sur5r.net Git - freertos/commitdiff
Tidy up SuperH port a bit ready for release.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 18 Feb 2010 13:23:00 +0000 (13:23 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 18 Feb 2010 13:23:00 +0000 (13:23 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@984 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/Common/ethernet/FreeTCPIP/apps/httpd/httpd.c
Demo/Common/ethernet/FreeTCPIP/psock.c
Demo/Common/ethernet/FreeTCPIP/uip.c

index 93667da82711f9ad7e9b66787f3d912d8a4d2b93..d40bafe560378cd6fb15063777c8d0e37f1ed1a1 100644 (file)
@@ -297,6 +297,15 @@ static PT_THREAD( handle_input ( struct httpd_state *s ) )
        else\r
        {\r
                s->inputbuf[PSOCK_DATALEN( &s->sin ) - 1] = 0;\r
+               \r
+               /* Process any form input being sent to the server. */\r
+               #if UIP_CONF_PROCESS_HTTPD_FORMS == 1\r
+               {\r
+                       extern void vApplicationProcessFormInput( char *pcInputString );\r
+                       vApplicationProcessFormInput( s->inputbuf );\r
+               }\r
+               #endif\r
+               \r
                strncpy( s->filename, &s->inputbuf[0], sizeof(s->filename) );\r
        }\r
 \r
index 655253391db3715fc8fbdea94559c77cacd7297a..6bd1f6affb94e1994281e8d672a2f5d981266571 100644 (file)
@@ -187,7 +187,7 @@ PT_THREAD(psock_send(register struct psock *s, const char *buf,
   /* Save the length of and a pointer to the data that is to be\r
      sent. */\r
   s->sendptr = (unsigned char*)buf;\r
-  s->sendlen = len;\r
+  s->sendlen = (unsigned short)len;\r
 \r
   s->state = STATE_NONE;\r
 \r
index 3c6d72c3039e3c6359ff9a23d26d211904f4f36d..c03dde4eb616e0f695ae193e2cbc87c2f025d63c 100644 (file)
@@ -766,9 +766,9 @@ void uip_process( u8_t flag )
                uip_slen = 0;\r
 \r
                /* Check if the connection is in a state in which we simply wait\r
-       for the connection to time out. If so, we increase the\r
-       connection's timer and remove the connection if it times\r
-       out. */\r
+               for the connection to time out. If so, we increase the\r
+               connection's timer and remove the connection if it times\r
+               out. */\r
                if( uip_connr->tcpstateflags == UIP_TIME_WAIT || uip_connr->tcpstateflags == UIP_FIN_WAIT_2 )\r
                {\r
                        ++( uip_connr->timer );\r
@@ -780,9 +780,9 @@ void uip_process( u8_t flag )
                else if( uip_connr->tcpstateflags != UIP_CLOSED )\r
                {\r
                        /* If the connection has outstanding data, we increase the\r
-        connection's timer and see if it has reached the RTO value\r
-        in which case we retransmit. */\r
-                       if( uip_outstanding(uip_connr) )\r
+                       connection's timer and see if it has reached the RTO value\r
+                       in which case we retransmit. */\r
+                               if( uip_outstanding(uip_connr) )\r
                        {\r
                                if( uip_connr->timer-- == 0 )\r
                                {\r
@@ -798,9 +798,9 @@ void uip_process( u8_t flag )
                                                uip_connr->tcpstateflags = UIP_CLOSED;\r
 \r
                                                /* We call UIP_APPCALL() with uip_flags set to\r
-              UIP_TIMEDOUT to inform the application that the\r
-              connection has timed out. */\r
-                                               uip_flags = UIP_TIMEDOUT;\r
+                                               UIP_TIMEDOUT to inform the application that the\r
+                                               connection has timed out. */\r
+                                                                       uip_flags = UIP_TIMEDOUT;\r
                                                UIP_APPCALL();\r
 \r
                                                /* We also send a reset packet to the remote host. */\r
@@ -813,17 +813,17 @@ void uip_process( u8_t flag )
                                        ++( uip_connr->nrtx );\r
 \r
                                        /* Ok, so we need to retransmit. We do this differently\r
-            depending on which state we are in. In ESTABLISHED, we\r
-            call upon the application so that it may prepare the\r
-            data for the retransmit. In SYN_RCVD, we resend the\r
-            SYNACK that we sent earlier and in LAST_ACK we have to\r
-            retransmit our FINACK. */\r
-                                       UIP_STAT( ++uip_stat.tcp.rexmit );\r
+                                       depending on which state we are in. In ESTABLISHED, we\r
+                                       call upon the application so that it may prepare the\r
+                                       data for the retransmit. In SYN_RCVD, we resend the\r
+                                       SYNACK that we sent earlier and in LAST_ACK we have to\r
+                                       retransmit our FINACK. */\r
+                                                       UIP_STAT( ++uip_stat.tcp.rexmit );\r
                                        switch( uip_connr->tcpstateflags & UIP_TS_MASK )\r
                                        {\r
                                                case UIP_SYN_RCVD:\r
                                                        /* In the SYN_RCVD state, we should retransmit our\r
-               SYNACK. */\r
+                                               SYNACK. */\r
                                                        goto tcp_send_synack;\r
 \r
        #if UIP_ACTIVE_OPEN\r
@@ -836,9 +836,9 @@ void uip_process( u8_t flag )
 \r
                                                case UIP_ESTABLISHED:\r
                                                        /* In the ESTABLISHED state, we call upon the application\r
-               to do the actual retransmit after which we jump into\r
-               the code for sending out the packet (the apprexmit\r
-               label). */\r
+                                                       to do the actual retransmit after which we jump into\r
+                                                       the code for sending out the packet (the apprexmit\r
+                                                       label). */\r
                                                        uip_flags = UIP_REXMIT;\r
                                                        UIP_APPCALL();\r
                                                        goto apprexmit;\r
@@ -854,7 +854,7 @@ void uip_process( u8_t flag )
                        else if( (uip_connr->tcpstateflags & UIP_TS_MASK) == UIP_ESTABLISHED )\r
                        {\r
                                /* If there was no need for a retransmission, we poll the\r
-           application for new data. */\r
+                               application for new data. */\r
                                uip_flags = UIP_POLL;\r
                                UIP_APPCALL();\r
                                goto appsend;\r