Add variable update time for Ajax display. Update status.shtml with <pre> tag now used by cgi.

This commit is contained in:
David Kopf 2012-03-10 10:43:23 -05:00
parent cf3827829d
commit ca273e28e9
7 changed files with 123 additions and 36 deletions

View file

@ -94,7 +94,6 @@ static
PT_THREAD(send_file(struct httpd_state *s))
{
PSOCK_BEGIN(&s->sout);
do {
PSOCK_GENERATOR_SEND(&s->sout, generate, s);
s->file.len -= s->len;
@ -488,11 +487,18 @@ httpd_appcall(void *state)
PT_INIT(&s->outputpt);
s->state = STATE_WAITING;
s->timer = 0;
#if WEBSERVER_CONF_AJAX
s->ajax_timeout = WEBSERVER_CONF_TIMEOUT;
#endif
handle_connection(s);
} else if(s != NULL) {
if(uip_poll()) {
++s->timer;
if(s->timer >= 20) {
#if WEBSERVER_CONF_AJAX
if(s->timer >= s->ajax_timeout) {
#else
if(s->timer >= WEBSERVER_CONF_TIMEOUT) {
#endif
uip_abort();
memb_free(&conns, s);
}