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>
|
||||
*
|
||||
* $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>
|
||||
|
@ -137,17 +137,15 @@ PT_THREAD(handle_output(struct httpd_state *s))
|
|||
strcpy(s->filename, "notfound.html");
|
||||
s->fd = cfs_open(s->filename, CFS_READ);
|
||||
petsciiconv_toascii(s->filename, sizeof(s->filename));
|
||||
if(s->fd < 0) {
|
||||
PT_WAIT_THREAD(&s->outputpt,
|
||||
send_headers(s, http_header_404));
|
||||
if(s->fd < 0) {
|
||||
PT_WAIT_THREAD(&s->outputpt,
|
||||
send_string(s, "not found"));
|
||||
uip_close();
|
||||
webserver_log_file(&uip_conn->ripaddr, "404 (no notfound.html)");
|
||||
PT_EXIT(&s->outputpt);
|
||||
}
|
||||
PT_WAIT_THREAD(&s->outputpt,
|
||||
send_headers(s, http_header_404));
|
||||
webserver_log_file(&uip_conn->ripaddr, "404 - notfound.html");
|
||||
} else {
|
||||
PT_WAIT_THREAD(&s->outputpt,
|
||||
|
|
Loading…
Reference in a new issue