fixed counter overrun in ?auto in mod_status (#909)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1941 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.17
Jan Kneschke 16 years ago
parent e745fd6a12
commit 7d2665843f

@ -15,6 +15,7 @@ NEWS
* fixed invalid char in header values (#1286)
* fixed invalid "304 Not Modified" on broken timestamps
* fixed endless loop on shrinked files with sendfile() on BSD (#1289)
* fixed counter overrun in ?auto in mod_status (#909)
* removed config-check if passwd files exist (#1188)
- 1.4.16 -

@ -559,19 +559,22 @@ static handler_t mod_status_handle_server_status_text(server *srv, connection *c
buffer *b;
double avg;
time_t ts;
char buf[32];
b = chunkqueue_get_append_buffer(con->write_queue);
/* output total number of requests */
BUFFER_APPEND_STRING_CONST(b, "Total Accesses: ");
avg = p->abs_requests;
buffer_append_long(b, avg);
snprintf(buf, sizeof(buf) - 1, "%.0f", avg);
buffer_append_string(b, buf);
BUFFER_APPEND_STRING_CONST(b, "\n");
/* output total traffic out in kbytes */
BUFFER_APPEND_STRING_CONST(b, "Total kBytes: ");
avg = p->abs_traffic_out / 1024;
buffer_append_long(b, avg);
snprintf(buf, sizeof(buf) - 1, "%.0f", avg);
buffer_append_string(b, buf);
BUFFER_APPEND_STRING_CONST(b, "\n");
/* output uptime */

Loading…
Cancel
Save