diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-04-05 10:14:51 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-04-05 10:14:51 +0000 |
commit | 2381a7019072f8f6983f323a2bc0913ac115aed3 (patch) | |
tree | 86418ad601fa8bd20549736d93ea4b4fc46b537d /demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c | |
parent | 60d63e9970553058597fd78941a7fa0ecb4f374b (diff) | |
download | ChibiOS-2381a7019072f8f6983f323a2bc0913ac115aed3.tar.gz ChibiOS-2381a7019072f8f6983f323a2bc0913ac115aed3.tar.bz2 ChibiOS-2381a7019072f8f6983f323a2bc0913ac115aed3.zip |
Board files regenerated with the updated tool. Fixed some errors in demos.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7854 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c')
-rw-r--r-- | demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c index 1c0ea7c03..46aac872f 100644 --- a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c +++ b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c @@ -87,7 +87,7 @@ THD_WORKING_AREA(wa_http_server, WEB_THREAD_STACK_SIZE); /** * HTTP server thread. */ -msg_t http_server(void *p) { +THD_FUNCTION(http_server, p) { struct netconn *conn, *newconn; err_t err; @@ -96,7 +96,7 @@ msg_t http_server(void *p) { /* Create a new TCP connection handle */ conn = netconn_new(NETCONN_TCP); - LWIP_ERROR("http_server: invalid conn", (conn != NULL), return MSG_RESET;); + LWIP_ERROR("http_server: invalid conn", (conn != NULL), chThdExit(MSG_RESET);); /* Bind to port 80 (HTTP) with default IP address */ netconn_bind(conn, NULL, WEB_THREAD_PORT); @@ -107,14 +107,13 @@ msg_t http_server(void *p) { /* Goes to the final priority after initialization.*/ chThdSetPriority(WEB_THREAD_PRIORITY); - while(1) { + while (true) { err = netconn_accept(conn, &newconn); if (err != ERR_OK) continue; http_server_serve(newconn); netconn_delete(newconn); } - return MSG_OK; } #endif /* LWIP_NETCONN */ |