Fix TCP list managment bug

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@392 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-11-20 21:55:06 +00:00
parent ea2ca7bfc3
commit 295bf51f3f
5 changed files with 20 additions and 5 deletions

View File

@ -232,4 +232,5 @@
* Add strcat() and strncat() * Add strcat() and strncat()
* Integrated uIP micro webserver * Integrated uIP micro webserver
* Corrected a serious bug in TCP queue management

View File

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4"> <tr align="center" bgcolor="#e4e4e4">
<td> <td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1> <h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
<p>Last Updated: November 19, 2007</p> <p>Last Updated: November 20, 2007</p>
</td> </td>
</tr> </tr>
</table> </table>
@ -693,6 +693,7 @@ Other memory:
* Add strcat() and strncat() * Add strcat() and strncat()
* Integrated uIP micro webserver * Integrated uIP micro webserver
* Corrected a serious bug in TCP queue management
</pre></ul> </pre></ul>
<table width ="100%"> <table width ="100%">

View File

@ -304,7 +304,7 @@ void uip_tcpfree(struct uip_conn *conn)
{ {
/* Remove the connection from the active list */ /* Remove the connection from the active list */
dq_rem(&conn->node, &g_free_tcp_connections); dq_rem(&conn->node, &g_active_tcp_connections);
} }
/* Release any read-ahead buffers attached to the connection */ /* Release any read-ahead buffers attached to the connection */

View File

@ -469,7 +469,7 @@ static void *httpd_handler(void *arg)
if (pstate) if (pstate)
{ {
/* Loop processing each HTTP command */ /* Loop processing each HTTP command */
do // do
{ {
/* Re-initialize the thread state structure */ /* Re-initialize the thread state structure */
@ -480,7 +480,7 @@ static void *httpd_handler(void *arg)
ret = httpd_cmd(pstate); ret = httpd_cmd(pstate);
} }
while (ret == OK); // while (ret == OK);
/* End of command processing -- Clean up and exit */ /* End of command processing -- Clean up and exit */

View File

@ -54,9 +54,22 @@
****************************************************************************/ ****************************************************************************/
#define HTTPD_FS_STATISTICS 1 #define HTTPD_FS_STATISTICS 1
#define HTTPD_IOBUFFER_SIZE UIP_TCP_MSS
/* For efficiency reasons, the size of the IO buffer should be a multiple
* of the TCP MSS value. Also, the current design requires that the IO
* buffer be sufficiently large to contain the entire GET request.
*/
#define HTTPD_IOBUFFER_SIZE (3*UIP_TCP_MSS)
/* this is the maximum size of a file path */
#define HTTPD_MAX_FILENAME 20 #define HTTPD_MAX_FILENAME 20
/* As threads are created to handle each request, a stack must be allocated
* for the thread. Use a default if the user provided no stacksize.
*/
#ifndef CONFIG_EXAMPLES_UIP_HTTPDSTACKSIZE #ifndef CONFIG_EXAMPLES_UIP_HTTPDSTACKSIZE
# define CONFIG_EXAMPLES_UIP_HTTPDSTACKSIZE 4096 # define CONFIG_EXAMPLES_UIP_HTTPDSTACKSIZE 4096
#endif #endif