mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Tidy up SuperH port a bit ready for release.
This commit is contained in:
parent
e35180acd9
commit
450e344455
|
@ -297,6 +297,15 @@ static PT_THREAD( handle_input ( struct httpd_state *s ) )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s->inputbuf[PSOCK_DATALEN( &s->sin ) - 1] = 0;
|
s->inputbuf[PSOCK_DATALEN( &s->sin ) - 1] = 0;
|
||||||
|
|
||||||
|
/* Process any form input being sent to the server. */
|
||||||
|
#if UIP_CONF_PROCESS_HTTPD_FORMS == 1
|
||||||
|
{
|
||||||
|
extern void vApplicationProcessFormInput( char *pcInputString );
|
||||||
|
vApplicationProcessFormInput( s->inputbuf );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
strncpy( s->filename, &s->inputbuf[0], sizeof(s->filename) );
|
strncpy( s->filename, &s->inputbuf[0], sizeof(s->filename) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
/* Save the length of and a pointer to the data that is to be
|
||||||
sent. */
|
sent. */
|
||||||
s->sendptr = (unsigned char*)buf;
|
s->sendptr = (unsigned char*)buf;
|
||||||
s->sendlen = len;
|
s->sendlen = (unsigned short)len;
|
||||||
|
|
||||||
s->state = STATE_NONE;
|
s->state = STATE_NONE;
|
||||||
|
|
||||||
|
|
|
@ -766,9 +766,9 @@ void uip_process( u8_t flag )
|
||||||
uip_slen = 0;
|
uip_slen = 0;
|
||||||
|
|
||||||
/* Check if the connection is in a state in which we simply wait
|
/* Check if the connection is in a state in which we simply wait
|
||||||
for the connection to time out. If so, we increase the
|
for the connection to time out. If so, we increase the
|
||||||
connection's timer and remove the connection if it times
|
connection's timer and remove the connection if it times
|
||||||
out. */
|
out. */
|
||||||
if( uip_connr->tcpstateflags == UIP_TIME_WAIT || uip_connr->tcpstateflags == UIP_FIN_WAIT_2 )
|
if( uip_connr->tcpstateflags == UIP_TIME_WAIT || uip_connr->tcpstateflags == UIP_FIN_WAIT_2 )
|
||||||
{
|
{
|
||||||
++( uip_connr->timer );
|
++( uip_connr->timer );
|
||||||
|
@ -780,9 +780,9 @@ void uip_process( u8_t flag )
|
||||||
else if( uip_connr->tcpstateflags != UIP_CLOSED )
|
else if( uip_connr->tcpstateflags != UIP_CLOSED )
|
||||||
{
|
{
|
||||||
/* If the connection has outstanding data, we increase the
|
/* If the connection has outstanding data, we increase the
|
||||||
connection's timer and see if it has reached the RTO value
|
connection's timer and see if it has reached the RTO value
|
||||||
in which case we retransmit. */
|
in which case we retransmit. */
|
||||||
if( uip_outstanding(uip_connr) )
|
if( uip_outstanding(uip_connr) )
|
||||||
{
|
{
|
||||||
if( uip_connr->timer-- == 0 )
|
if( uip_connr->timer-- == 0 )
|
||||||
{
|
{
|
||||||
|
@ -798,9 +798,9 @@ void uip_process( u8_t flag )
|
||||||
uip_connr->tcpstateflags = UIP_CLOSED;
|
uip_connr->tcpstateflags = UIP_CLOSED;
|
||||||
|
|
||||||
/* We call UIP_APPCALL() with uip_flags set to
|
/* We call UIP_APPCALL() with uip_flags set to
|
||||||
UIP_TIMEDOUT to inform the application that the
|
UIP_TIMEDOUT to inform the application that the
|
||||||
connection has timed out. */
|
connection has timed out. */
|
||||||
uip_flags = UIP_TIMEDOUT;
|
uip_flags = UIP_TIMEDOUT;
|
||||||
UIP_APPCALL();
|
UIP_APPCALL();
|
||||||
|
|
||||||
/* We also send a reset packet to the remote host. */
|
/* We also send a reset packet to the remote host. */
|
||||||
|
@ -813,17 +813,17 @@ void uip_process( u8_t flag )
|
||||||
++( uip_connr->nrtx );
|
++( uip_connr->nrtx );
|
||||||
|
|
||||||
/* Ok, so we need to retransmit. We do this differently
|
/* Ok, so we need to retransmit. We do this differently
|
||||||
depending on which state we are in. In ESTABLISHED, we
|
depending on which state we are in. In ESTABLISHED, we
|
||||||
call upon the application so that it may prepare the
|
call upon the application so that it may prepare the
|
||||||
data for the retransmit. In SYN_RCVD, we resend the
|
data for the retransmit. In SYN_RCVD, we resend the
|
||||||
SYNACK that we sent earlier and in LAST_ACK we have to
|
SYNACK that we sent earlier and in LAST_ACK we have to
|
||||||
retransmit our FINACK. */
|
retransmit our FINACK. */
|
||||||
UIP_STAT( ++uip_stat.tcp.rexmit );
|
UIP_STAT( ++uip_stat.tcp.rexmit );
|
||||||
switch( uip_connr->tcpstateflags & UIP_TS_MASK )
|
switch( uip_connr->tcpstateflags & UIP_TS_MASK )
|
||||||
{
|
{
|
||||||
case UIP_SYN_RCVD:
|
case UIP_SYN_RCVD:
|
||||||
/* In the SYN_RCVD state, we should retransmit our
|
/* In the SYN_RCVD state, we should retransmit our
|
||||||
SYNACK. */
|
SYNACK. */
|
||||||
goto tcp_send_synack;
|
goto tcp_send_synack;
|
||||||
|
|
||||||
#if UIP_ACTIVE_OPEN
|
#if UIP_ACTIVE_OPEN
|
||||||
|
@ -836,9 +836,9 @@ void uip_process( u8_t flag )
|
||||||
|
|
||||||
case UIP_ESTABLISHED:
|
case UIP_ESTABLISHED:
|
||||||
/* In the ESTABLISHED state, we call upon the application
|
/* In the ESTABLISHED state, we call upon the application
|
||||||
to do the actual retransmit after which we jump into
|
to do the actual retransmit after which we jump into
|
||||||
the code for sending out the packet (the apprexmit
|
the code for sending out the packet (the apprexmit
|
||||||
label). */
|
label). */
|
||||||
uip_flags = UIP_REXMIT;
|
uip_flags = UIP_REXMIT;
|
||||||
UIP_APPCALL();
|
UIP_APPCALL();
|
||||||
goto apprexmit;
|
goto apprexmit;
|
||||||
|
@ -854,7 +854,7 @@ void uip_process( u8_t flag )
|
||||||
else if( (uip_connr->tcpstateflags & UIP_TS_MASK) == UIP_ESTABLISHED )
|
else if( (uip_connr->tcpstateflags & UIP_TS_MASK) == UIP_ESTABLISHED )
|
||||||
{
|
{
|
||||||
/* If there was no need for a retransmission, we poll the
|
/* If there was no need for a retransmission, we poll the
|
||||||
application for new data. */
|
application for new data. */
|
||||||
uip_flags = UIP_POLL;
|
uip_flags = UIP_POLL;
|
||||||
UIP_APPCALL();
|
UIP_APPCALL();
|
||||||
goto appsend;
|
goto appsend;
|
||||||
|
|
Loading…
Reference in a new issue