From b9cf4815e5445db2d805117c90adaa1755c853cf Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Wed, 3 Feb 2010 11:31:59 +0000 Subject: Disable uIP connection polling for now - this seems to corrupt the buffers. --- Projects/Webserver/Lib/HTTPServerApp.c | 6 ++---- Projects/Webserver/Lib/TELNETServerApp.c | 8 ++++---- Projects/Webserver/Lib/uIPManagement.c | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'Projects/Webserver/Lib') diff --git a/Projects/Webserver/Lib/HTTPServerApp.c b/Projects/Webserver/Lib/HTTPServerApp.c index 9a70dade1..635a3076c 100644 --- a/Projects/Webserver/Lib/HTTPServerApp.c +++ b/Projects/Webserver/Lib/HTTPServerApp.c @@ -199,7 +199,6 @@ static void HTTPServerApp_SendResponseHeader(void) char* const AppData = (char*)uip_appdata; char* HeaderToSend; - uint16_t HeaderLength; /* Determine which HTTP header should be sent to the client */ if (AppState->HTTPServer.FileOpen) @@ -214,9 +213,8 @@ static void HTTPServerApp_SendResponseHeader(void) } /* Copy over the HTTP response header and send it to the receiving client */ - HeaderLength = strlen_P(HeaderToSend); - strncpy_P(AppData, HeaderToSend, HeaderLength); - uip_send(AppData, HeaderLength); + strcpy_P(AppData, HeaderToSend); + uip_send(AppData, strlen(AppData)); } /** HTTP Server State handler for the MIME Header Send state. This state manages the transmission of the file diff --git a/Projects/Webserver/Lib/TELNETServerApp.c b/Projects/Webserver/Lib/TELNETServerApp.c index cabf52756..720f7d14c 100644 --- a/Projects/Webserver/Lib/TELNETServerApp.c +++ b/Projects/Webserver/Lib/TELNETServerApp.c @@ -79,15 +79,15 @@ void TELNETServerApp_Callback(void) { case TELNET_STATE_SendHeader: /* Copy over and send the TELNET welcome message upon first connection */ - strncpy_P(AppData, WelcomeHeader, strlen_P(WelcomeHeader)); - uip_send(AppData, strlen_P(WelcomeHeader)); + strcpy_P(AppData, WelcomeHeader); + uip_send(AppData, strlen(AppData)); AppState->TELNETServer.NextState = TELNET_STATE_SendMenu; break; case TELNET_STATE_SendMenu: /* Copy over and send the TELNET menu to the client */ - strncpy_P(AppData, TELNETMenu, strlen_P(TELNETMenu)); - uip_send(AppData, strlen_P(TELNETMenu)); + strcpy_P(AppData, TELNETMenu); + uip_send(AppData, strlen(AppData)); AppState->TELNETServer.NextState = TELNET_STATE_GetCommand; break; diff --git a/Projects/Webserver/Lib/uIPManagement.c b/Projects/Webserver/Lib/uIPManagement.c index a2cadd674..1b94e8afa 100644 --- a/Projects/Webserver/Lib/uIPManagement.c +++ b/Projects/Webserver/Lib/uIPManagement.c @@ -175,6 +175,7 @@ static void uIPManagement_ProcessIncommingPacket(void) /** Manages the currently open network connections, including TCP and (if enabled) UDP. */ static void uIPManagement_ManageConnections(void) { +#if 0 /* Poll TCP connections for more data to send back to the host */ for (uint8_t i = 0; i < UIP_CONNS; i++) { @@ -189,7 +190,7 @@ static void uIPManagement_ManageConnections(void) RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len); } } - +#endif /* Manage open connections for timeouts */ if (timer_expired(&ConnectionTimer)) { -- cgit v1.2.3