mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-19 20:27:01 +00:00
CLEANUP: fd: remove fdtab->flags
These flags were added for TCP_CORK. They were only set at various places but never checked by any user since TCP_CORK was replaced with MSG_MORE. Simply get rid of this now.
This commit is contained in:
parent
34ffd77648
commit
40ff59d820
@ -51,13 +51,6 @@ enum {
|
||||
#define FD_POLL_DATA (FD_POLL_IN | FD_POLL_OUT)
|
||||
#define FD_POLL_STICKY (FD_POLL_ERR | FD_POLL_HUP)
|
||||
|
||||
/* bit values for fdtab[fd]->flags. Most of them are used to hold a value
|
||||
* consecutive to a behaviour change.
|
||||
*/
|
||||
#define FD_FL_TCP 0x0001 /* socket is TCP */
|
||||
#define FD_FL_TCP_NODELAY 0x0002
|
||||
#define FD_FL_TCP_NOLING 0x0004 /* lingering disabled */
|
||||
|
||||
/* info about one given fd */
|
||||
struct fdtab {
|
||||
int (*iocb)(int fd); /* I/O handler, returns FD_WAIT_* */
|
||||
@ -66,7 +59,6 @@ struct fdtab {
|
||||
unsigned char e; /* read and write events status. 4 bits, may be merged into flags' lower bits */
|
||||
unsigned int s1; /* Position in spec list+1. 0=not in list. */
|
||||
} spec;
|
||||
unsigned short flags; /* various flags precising the exact status of this fd */
|
||||
unsigned char ev; /* event seen in return of poll() : FD_POLL_* */
|
||||
};
|
||||
|
||||
|
@ -1476,7 +1476,6 @@ static struct task *process_chk(struct task *t)
|
||||
fd_insert(fd);
|
||||
fdtab[fd].owner = t;
|
||||
fdtab[fd].iocb = &check_iocb;
|
||||
fdtab[fd].flags = FD_FL_TCP | FD_FL_TCP_NODELAY;
|
||||
fd_want_send(fd); /* for connect status */
|
||||
#ifdef DEBUG_FULL
|
||||
assert (!EV_FD_ISSET(fd, DIR_RD));
|
||||
|
@ -197,10 +197,6 @@ int frontend_accept(struct session *s)
|
||||
s->req->rto = s->fe->timeout.client;
|
||||
s->rep->wto = s->fe->timeout.client;
|
||||
|
||||
fdtab[cfd].flags = FD_FL_TCP | FD_FL_TCP_NODELAY;
|
||||
if (s->fe->options & PR_O_TCP_NOLING)
|
||||
fdtab[cfd].flags |= FD_FL_TCP_NOLING;
|
||||
|
||||
if (unlikely((s->fe->mode == PR_MODE_HTTP && (s->flags & SN_MONITOR)) ||
|
||||
(s->fe->mode == PR_MODE_HEALTH && ((s->fe->options2 & PR_O2_CHK_ANY) == PR_O2_HTTP_CHK)))) {
|
||||
/* Either we got a request from a monitoring system on an HTTP instance,
|
||||
|
@ -452,7 +452,6 @@ int tcp_connect_server(struct connection *conn, int data)
|
||||
}
|
||||
|
||||
fdtab[fd].owner = conn;
|
||||
fdtab[fd].flags = FD_FL_TCP | FD_FL_TCP_NODELAY;
|
||||
conn->flags = CO_FL_WAIT_L4_CONN; /* connection in progress */
|
||||
|
||||
fdtab[fd].iocb = conn_fd_handler;
|
||||
@ -694,7 +693,6 @@ int tcp_bind_listener(struct listener *listener, char *errmsg, int errlen)
|
||||
listener->state = LI_LISTEN;
|
||||
|
||||
fdtab[fd].owner = listener; /* reference the listener instead of a task */
|
||||
fdtab[fd].flags = FD_FL_TCP | ((listener->options & LI_O_NOLINGER) ? FD_FL_TCP_NOLING : 0);
|
||||
fdtab[fd].iocb = listener->proto->accept;
|
||||
fd_insert(fd);
|
||||
|
||||
|
@ -151,7 +151,6 @@ int session_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
|
||||
/* finish initialization of the accepted file descriptor */
|
||||
fd_insert(cfd);
|
||||
fdtab[cfd].owner = &s->si[0].conn;
|
||||
fdtab[cfd].flags = 0;
|
||||
fdtab[cfd].iocb = conn_fd_handler;
|
||||
conn_data_want_recv(&s->si[0].conn);
|
||||
if (conn_data_init(&s->si[0].conn) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user