projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Commit for the 100219 release.
[pub/USBasp.git]
/
Projects
/
Webserver
/
Lib
/
HTTPServerApp.c
diff --git
a/Projects/Webserver/Lib/HTTPServerApp.c
b/Projects/Webserver/Lib/HTTPServerApp.c
index
b6277d3
..
4e00952
100644
(file)
--- a/
Projects/Webserver/Lib/HTTPServerApp.c
+++ b/
Projects/Webserver/Lib/HTTPServerApp.c
@@
-100,13
+100,9
@@
void HTTPServerApp_Callback(void)
\r
if (uip_aborted() || uip_timedout() || uip_closed())
\r
{
\r
\r
if (uip_aborted() || uip_timedout() || uip_closed())
\r
{
\r
- /* Connection is being terminated for some reason - close file handle */
\r
- f_close(&AppState->HTTPServer.FileHandle);
\r
- AppState->HTTPServer.FileOpen = false;
\r
-
\r
/* Lock to the closed state so that no further processing will occur on the connection */
\r
/* Lock to the closed state so that no further processing will occur on the connection */
\r
- AppState->HTTPServer.CurrentState = WEBSERVER_STATE_Clos
ed
;
\r
- AppState->HTTPServer.NextState = WEBSERVER_STATE_Clos
ed
;
\r
+ AppState->HTTPServer.CurrentState = WEBSERVER_STATE_Clos
ing
;
\r
+ AppState->HTTPServer.NextState = WEBSERVER_STATE_Clos
ing
;
\r
}
\r
\r
if (uip_connected())
\r
}
\r
\r
if (uip_connected())
\r
@@
-148,9
+144,15
@@
void HTTPServerApp_Callback(void)
HTTPServerApp_SendData();
\r
break;
\r
case WEBSERVER_STATE_Closing:
\r
HTTPServerApp_SendData();
\r
break;
\r
case WEBSERVER_STATE_Closing:
\r
+ /* Connection is being terminated for some reason - close file handle */
\r
+ f_close(&AppState->HTTPServer.FileHandle);
\r
+ AppState->HTTPServer.FileOpen = false;
\r
+
\r
+ /* If connection is not already closed, close it */
\r
uip_close();
\r
\r
uip_close();
\r
\r
- AppState->HTTPServer.NextState = WEBSERVER_STATE_Closed;
\r
+ AppState->HTTPServer.CurrentState = WEBSERVER_STATE_Closed;
\r
+ AppState->HTTPServer.NextState = WEBSERVER_STATE_Closed;
\r
break;
\r
}
\r
}
\r
break;
\r
}
\r
}
\r