1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Fix a problem displaying status when a threaded MPM is used.

The line

   int indx = (i * HARD_THREAD_LIMIT) + j;

in the vicinity of the change was bad; k needed to be added
instead of j.

I swapped the use of j and k in this section so that i and j
had the same meaning as in an earlier nested loop.  I suspect
that the difference in meaning is what led to the bug.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88397 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2001-02-28 18:41:44 +00:00
parent 52f43d1a7f
commit 7f17e1292a

View File

@@ -469,20 +469,20 @@ static int status_handler(request_rec *r)
ap_rputs("\"<B><code>.</code></B>\" Open slot with no current process<P>\n", r);
ap_rputs("<P>\n", r);
if (!ap_extended_status) {
int j = 0;
int k;
int j;
int k = 0;
ap_rputs("PID Key: <br>\n", r);
ap_rputs("<PRE>\n", r);
for (i = 0; i < HARD_SERVER_LIMIT; ++i) {
for (k = 0; k < HARD_THREAD_LIMIT; ++k) {
for (j = 0; j < HARD_THREAD_LIMIT; ++j) {
int indx = (i * HARD_THREAD_LIMIT) + j;
if (stat_buffer[indx] != '.') {
ap_rprintf(r, " %d in state: %c ", pid_buffer[i],
stat_buffer[indx]);
if (++j >= 3) {
if (++k >= 3) {
ap_rputs("\n", r);
j = 0;
k = 0;
} else
ap_rputs(",", r);
}