mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 07:11:20 +02:00
[CLEANUP] session: remove data_source from struct session
This one was only used for logging purposes, it's not needed anymore.
This commit is contained in:
parent
71904a4ee8
commit
75581aebb0
@ -186,10 +186,6 @@
|
|||||||
#define HTTP_MSG_CLOSED 35 // shutdown_w done, all bytes sent
|
#define HTTP_MSG_CLOSED 35 // shutdown_w done, all bytes sent
|
||||||
#define HTTP_MSG_TUNNEL 36 // tunneled data after DONE
|
#define HTTP_MSG_TUNNEL 36 // tunneled data after DONE
|
||||||
|
|
||||||
/* various data sources for the responses */
|
|
||||||
#define DATA_SRC_NONE 0
|
|
||||||
#define DATA_SRC_STATS 1
|
|
||||||
|
|
||||||
/* data transmission states for the stats responses */
|
/* data transmission states for the stats responses */
|
||||||
enum {
|
enum {
|
||||||
DATA_ST_INIT = 0,
|
DATA_ST_INIT = 0,
|
||||||
|
@ -203,7 +203,6 @@ struct session {
|
|||||||
void (*do_log)(struct session *s); /* the function to call in order to log (or NULL) */
|
void (*do_log)(struct session *s); /* the function to call in order to log (or NULL) */
|
||||||
void (*srv_error)(struct session *s, /* the function to call upon unrecoverable server errors (or NULL) */
|
void (*srv_error)(struct session *s, /* the function to call upon unrecoverable server errors (or NULL) */
|
||||||
struct stream_interface *si);
|
struct stream_interface *si);
|
||||||
short int data_source; /* where to get the data we generate ourselves */
|
|
||||||
short int data_state; /* where to get the data we generate ourselves */
|
short int data_state; /* where to get the data we generate ourselves */
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
|
@ -99,7 +99,6 @@ int stats_accept(struct session *s)
|
|||||||
s->logs.srv_queue_size = 0; /* we will get this number soon */
|
s->logs.srv_queue_size = 0; /* we will get this number soon */
|
||||||
|
|
||||||
s->data_state = DATA_ST_INIT;
|
s->data_state = DATA_ST_INIT;
|
||||||
s->data_source = DATA_SRC_NONE;
|
|
||||||
|
|
||||||
s->req->flags |= BF_READ_DONTWAIT; /* we plan to read small requests */
|
s->req->flags |= BF_READ_DONTWAIT; /* we plan to read small requests */
|
||||||
|
|
||||||
@ -863,7 +862,6 @@ static void cli_io_handler(struct stream_interface *si)
|
|||||||
if (si->applet.st0 == STAT_CLI_INIT) {
|
if (si->applet.st0 == STAT_CLI_INIT) {
|
||||||
/* Stats output not initialized yet */
|
/* Stats output not initialized yet */
|
||||||
memset(&s->data_ctx.stats, 0, sizeof(s->data_ctx.stats));
|
memset(&s->data_ctx.stats, 0, sizeof(s->data_ctx.stats));
|
||||||
s->data_source = DATA_SRC_STATS;
|
|
||||||
si->applet.st0 = STAT_CLI_GETREQ;
|
si->applet.st0 = STAT_CLI_GETREQ;
|
||||||
}
|
}
|
||||||
else if (si->applet.st0 == STAT_CLI_END) {
|
else if (si->applet.st0 == STAT_CLI_END) {
|
||||||
|
@ -76,7 +76,6 @@ int frontend_accept(struct session *s)
|
|||||||
s->logs.srv_queue_size = 0; /* we will get this number soon */
|
s->logs.srv_queue_size = 0; /* we will get this number soon */
|
||||||
|
|
||||||
s->data_state = DATA_ST_INIT;
|
s->data_state = DATA_ST_INIT;
|
||||||
s->data_source = DATA_SRC_NONE;
|
|
||||||
|
|
||||||
/* FIXME: the logs are horribly complicated now, because they are
|
/* FIXME: the logs are horribly complicated now, because they are
|
||||||
* defined in <p>, <p>, and later <be> and <be>.
|
* defined in <p>, <p>, and later <be> and <be>.
|
||||||
|
@ -1204,8 +1204,6 @@ struct session *peer_session_create(struct peer *peer, struct peer_session *ps)
|
|||||||
/* default error reporting function, may be changed by analysers */
|
/* default error reporting function, may be changed by analysers */
|
||||||
s->srv_error = default_srv_error;
|
s->srv_error = default_srv_error;
|
||||||
|
|
||||||
s->data_source = DATA_SRC_NONE;
|
|
||||||
|
|
||||||
s->uniq_id = 0;
|
s->uniq_id = 0;
|
||||||
|
|
||||||
txn = &s->txn;
|
txn = &s->txn;
|
||||||
|
@ -3243,7 +3243,6 @@ int http_process_req_common(struct session *s, struct buffer *req, int an_bit, s
|
|||||||
}
|
}
|
||||||
|
|
||||||
s->logs.tv_request = now;
|
s->logs.tv_request = now;
|
||||||
s->data_source = DATA_SRC_STATS;
|
|
||||||
s->data_state = DATA_ST_INIT;
|
s->data_state = DATA_ST_INIT;
|
||||||
s->task->nice = -32; /* small boost for HTTP statistics */
|
s->task->nice = -32; /* small boost for HTTP statistics */
|
||||||
stream_int_register_handler(s->rep->prod, &http_stats_applet);
|
stream_int_register_handler(s->rep->prod, &http_stats_applet);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user