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

(-)include/httpd.h (+7 lines)
Lines 1095-1100 typedef enum { Link Here
1095
    AP_CONN_KEEPALIVE
1095
    AP_CONN_KEEPALIVE
1096
} ap_conn_keepalive_e;
1096
} ap_conn_keepalive_e;
1097
1097
1098
/* AP_SB_*_SIZE needed by conn_rec */
1099
#include "scoreboard.h"
1100
1098
/**
1101
/**
1099
 * @brief Structure to store things which are per connection
1102
 * @brief Structure to store things which are per connection
1100
 */
1103
 */
Lines 1217-1222 struct conn_rec { Link Here
1217
1220
1218
    /** The minimum level of filter type to allow setaside buckets */
1221
    /** The minimum level of filter type to allow setaside buckets */
1219
    int async_filter;
1222
    int async_filter;
1223
1224
    /** Preserve scoreboard's worker last request infos */
1225
    char sb_lastrline[AP_SB_RLINE_SIZE];
1226
    char sb_lastvhost[AP_SB_VHOST_SIZE];
1220
};
1227
};
1221
1228
1222
struct conn_slave_rec {
1229
struct conn_slave_rec {
(-)include/scoreboard.h (-2 / +5 lines)
Lines 85-90 typedef enum { Link Here
85
    SB_SHARED = 2
85
    SB_SHARED = 2
86
} ap_scoreboard_e;
86
} ap_scoreboard_e;
87
87
88
#define AP_SB_RLINE_SIZE 64
89
#define AP_SB_VHOST_SIZE 32
90
88
/* stuff which is worker specific */
91
/* stuff which is worker specific */
89
typedef struct worker_score worker_score;
92
typedef struct worker_score worker_score;
90
struct worker_score {
93
struct worker_score {
Lines 113-120 struct worker_score { Link Here
113
    struct tms times;
116
    struct tms times;
114
#endif
117
#endif
115
    char client[40];            /* Keep 'em small... but large enough to hold an IPv6 address */
118
    char client[40];            /* Keep 'em small... but large enough to hold an IPv6 address */
116
    char request[64];           /* We just want an idea... */
119
    char request[AP_SB_RLINE_SIZE]; /* We just want an idea... */
117
    char vhost[32];             /* What virtual host is being accessed? */
120
    char vhost[AP_SB_VHOST_SIZE];   /* What virtual host is being accessed? */
118
    char protocol[16];          /* What protocol is used on the connection? */
121
    char protocol[16];          /* What protocol is used on the connection? */
119
};
122
};
120
123
(-)server/connection.c (-1 / +1 lines)
Lines 101-107 AP_DECLARE(int) ap_prep_lingering_close(conn_rec * Link Here
101
    ap_run_pre_close_connection(c);
101
    ap_run_pre_close_connection(c);
102
    
102
    
103
    if (c->sbh) {
103
    if (c->sbh) {
104
        ap_update_child_status(c->sbh, SERVER_CLOSING, NULL);
104
        ap_update_child_status_from_conn(c->sbh, SERVER_CLOSING, c);
105
    }
105
    }
106
    return 0;
106
    return 0;
107
}
107
}
(-)server/scoreboard.c (-2 / +5 lines)
Lines 499-507 static int update_child_status_internal(int child_ Link Here
499
        }
499
        }
500
        else if (r) {
500
        else if (r) {
501
            copy_request(ws->request, sizeof(ws->request), r);
501
            copy_request(ws->request, sizeof(ws->request), r);
502
            apr_cpystrn(c->sb_lastrline, ws->request, sizeof(c->sb_lastrline));
502
        }
503
        }
503
        else if (c) {
504
        else if (c) {
504
            ws->request[0]='\0';
505
            apr_cpystrn(ws->request, c->sb_lastrline, sizeof(ws->request));
505
        }
506
        }
506
507
507
        if (r && r->useragent_ip) {
508
        if (r && r->useragent_ip) {
Lines 522-527 static int update_child_status_internal(int child_ Link Here
522
            if (c) {
523
            if (c) {
523
                apr_snprintf(ws->vhost, sizeof(ws->vhost), "%s:%d",
524
                apr_snprintf(ws->vhost, sizeof(ws->vhost), "%s:%d",
524
                             s->server_hostname, c->local_addr->port);
525
                             s->server_hostname, c->local_addr->port);
526
                apr_cpystrn(c->sb_lastvhost, ws->vhost,
527
                            sizeof(c->sb_lastvhost));
525
            }
528
            }
526
            else {
529
            else {
527
                apr_cpystrn(ws->vhost, s->server_hostname, sizeof(ws->vhost));
530
                apr_cpystrn(ws->vhost, s->server_hostname, sizeof(ws->vhost));
Lines 528-534 static int update_child_status_internal(int child_ Link Here
528
            }
531
            }
529
        }
532
        }
530
        else if (c) {
533
        else if (c) {
531
            ws->vhost[0]='\0';
534
            apr_cpystrn(ws->vhost, c->sb_lastvhost, sizeof(ws->vhost));
532
        }
535
        }
533
536
534
        if (c) {
537
        if (c) {

Return to bug 59333