View | Details | Raw Unified | Return to bug 60647
Collapse All | Expand All

(-)server/scoreboard.c (-1 / +15 lines)
Lines 364-369 Link Here
364
    return (ap_scoreboard_image ? 1 : 0);
364
    return (ap_scoreboard_image ? 1 : 0);
365
}
365
}
366
366
367
AP_DECLARE(void) ap_set_conn_count(ap_sb_handle_t *sb, request_rec *r, unsigned short conn_count)
368
{
369
    worker_score *ws;
370
    apr_off_t bytes;
371
372
    if (!sb)
373
        return;
374
375
    ws = &ap_scoreboard_image->servers[sb->child_num][sb->thread_num];
376
    ws->conn_count = conn_count;
377
}
378
367
AP_DECLARE(void) ap_increment_counts(ap_sb_handle_t *sb, request_rec *r)
379
AP_DECLARE(void) ap_increment_counts(ap_sb_handle_t *sb, request_rec *r)
368
{
380
{
369
    worker_score *ws;
381
    worker_score *ws;
Lines 391-396 Link Here
391
    ws->conn_count++;
403
    ws->conn_count++;
392
    ws->bytes_served += bytes;
404
    ws->bytes_served += bytes;
393
    ws->my_bytes_served += bytes;
405
    ws->my_bytes_served += bytes;
406
394
    ws->conn_bytes += bytes;
407
    ws->conn_bytes += bytes;
395
}
408
}
396
409
Lines 489-495 Link Here
489
                ws->my_access_count = 0L;
502
                ws->my_access_count = 0L;
490
                ws->my_bytes_served = 0L;
503
                ws->my_bytes_served = 0L;
491
            }
504
            }
492
            ws->conn_count = 0;
505
506
            ws->conn_count = 99;
493
            ws->conn_bytes = 0;
507
            ws->conn_bytes = 0;
494
            ws->last_used = apr_time_now();
508
            ws->last_used = apr_time_now();
495
        }
509
        }
(-)modules/http/http_core.c (-1 / +2 lines)
Lines 142-148 Link Here
142
142
143
    while (cs->state == CONN_STATE_READ_REQUEST_LINE) {
143
    while (cs->state == CONN_STATE_READ_REQUEST_LINE) {
144
        ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_READ, c);
144
        ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_READ, c);
145
145
        ap_set_conn_count(c->sbh, r, c->keepalives);
146
        if ((r = ap_read_request(c))) {
146
        if ((r = ap_read_request(c))) {
147
147
148
            c->keepalive = AP_CONN_UNKNOWN;
148
            c->keepalive = AP_CONN_UNKNOWN;
Lines 150-155 Link Here
150
150
151
            if (r->status == HTTP_OK) {
151
            if (r->status == HTTP_OK) {
152
                cs->state = CONN_STATE_HANDLER;
152
                cs->state = CONN_STATE_HANDLER;
153
                ap_set_conn_count(c->sbh, r, c->keepalives+1);
153
                ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
154
                ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
154
                ap_process_async_request(r);
155
                ap_process_async_request(r);
155
                /* After the call to ap_process_request, the
156
                /* After the call to ap_process_request, the
(-)include/scoreboard.h (+1 lines)
Lines 169-174 Link Here
169
 */
169
 */
170
AP_DECLARE(int) ap_exists_scoreboard_image(void);
170
AP_DECLARE(int) ap_exists_scoreboard_image(void);
171
AP_DECLARE(void) ap_increment_counts(ap_sb_handle_t *sbh, request_rec *r);
171
AP_DECLARE(void) ap_increment_counts(ap_sb_handle_t *sbh, request_rec *r);
172
AP_DECLARE(void) ap_set_conn_count(ap_sb_handle_t *sb, request_rec *r, unsigned short conn_count);
172
173
173
AP_DECLARE(apr_status_t) ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached);
174
AP_DECLARE(apr_status_t) ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached);
174
AP_DECLARE(void) ap_init_scoreboard(void *shared_score);
175
AP_DECLARE(void) ap_init_scoreboard(void *shared_score);

Return to bug 60647