Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
7d3ed400
Commit
7d3ed400
authored
Feb 03, 2010
by
Dean Camera
Browse files
Fix TELNET server locking up if an invalid command was issued.
parent
b9cf4815
Changes
3
Hide whitespace changes
Inline
Side-by-side
Projects/Webserver/Lib/HTTPServerApp.c
View file @
7d3ed400
...
...
@@ -198,7 +198,7 @@ static void HTTPServerApp_SendResponseHeader(void)
uip_tcp_appstate_t
*
const
AppState
=
&
uip_conn
->
appstate
;
char
*
const
AppData
=
(
char
*
)
uip_appdata
;
char
*
HeaderToSend
;
char
*
HeaderToSend
;
/* Determine which HTTP header should be sent to the client */
if
(
AppState
->
HTTPServer
.
FileOpen
)
...
...
Projects/Webserver/Lib/TELNETServerApp.c
View file @
7d3ed400
...
...
@@ -106,7 +106,11 @@ void TELNETServerApp_Callback(void)
{
case
'c'
:
TELNETServerApp_DisplayTCPConnections
();
break
;
break
;
default:
strcpy
(
AppData
,
"Invalid Command.
\r\n
"
);
uip_send
(
AppData
,
strlen
(
AppData
));
break
;
}
AppState
->
TELNETServer
.
NextState
=
TELNET_STATE_SendMenu
;
...
...
Projects/Webserver/Lib/uIPManagement.c
View file @
7d3ed400
...
...
@@ -52,7 +52,7 @@ void uIPManagement_Init(void)
{
/* uIP Timing Initialization */
clock_init
();
timer_set
(
&
ConnectionTimer
,
CLOCK_SECOND
/
8
);
timer_set
(
&
ConnectionTimer
,
CLOCK_SECOND
/
10
);
timer_set
(
&
ARPTimer
,
CLOCK_SECOND
*
10
);
/* uIP Stack Initialization */
...
...
@@ -175,22 +175,6 @@ 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++)
{
uip_poll_conn(&uip_conns[i]);
/* If a response was generated, send it */
if (uip_len > 0)
{
/* Add destination MAC to outgoing packet */
uip_arp_out();
RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
}
}
#endif
/* Manage open connections for timeouts */
if
(
timer_expired
(
&
ConnectionTimer
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment