mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-18 03:30:31 +00:00
Reduced code size by removing one PT_WAIT_THREAD call site.
This commit is contained in:
parent
04fb6e5b42
commit
157a95ef19
@ -30,7 +30,7 @@
|
|||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $Id: httpd-cfs.c,v 1.18 2010/04/06 12:11:41 oliverschmidt Exp $
|
* $Id: httpd-cfs.c,v 1.19 2010/04/11 12:29:07 oliverschmidt Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -137,17 +137,15 @@ PT_THREAD(handle_output(struct httpd_state *s))
|
|||||||
strcpy(s->filename, "notfound.html");
|
strcpy(s->filename, "notfound.html");
|
||||||
s->fd = cfs_open(s->filename, CFS_READ);
|
s->fd = cfs_open(s->filename, CFS_READ);
|
||||||
petsciiconv_toascii(s->filename, sizeof(s->filename));
|
petsciiconv_toascii(s->filename, sizeof(s->filename));
|
||||||
|
PT_WAIT_THREAD(&s->outputpt,
|
||||||
|
send_headers(s, http_header_404));
|
||||||
if(s->fd < 0) {
|
if(s->fd < 0) {
|
||||||
PT_WAIT_THREAD(&s->outputpt,
|
|
||||||
send_headers(s, http_header_404));
|
|
||||||
PT_WAIT_THREAD(&s->outputpt,
|
PT_WAIT_THREAD(&s->outputpt,
|
||||||
send_string(s, "not found"));
|
send_string(s, "not found"));
|
||||||
uip_close();
|
uip_close();
|
||||||
webserver_log_file(&uip_conn->ripaddr, "404 (no notfound.html)");
|
webserver_log_file(&uip_conn->ripaddr, "404 (no notfound.html)");
|
||||||
PT_EXIT(&s->outputpt);
|
PT_EXIT(&s->outputpt);
|
||||||
}
|
}
|
||||||
PT_WAIT_THREAD(&s->outputpt,
|
|
||||||
send_headers(s, http_header_404));
|
|
||||||
webserver_log_file(&uip_conn->ripaddr, "404 - notfound.html");
|
webserver_log_file(&uip_conn->ripaddr, "404 - notfound.html");
|
||||||
} else {
|
} else {
|
||||||
PT_WAIT_THREAD(&s->outputpt,
|
PT_WAIT_THREAD(&s->outputpt,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user