int (*f)(int fd); /* read/write function */
struct buffer *b; /* read/write buffer */
} cb[DIR_SIZE];
- struct task *owner; /* the session (or proxy) associated with this fd */
+ void *owner; /* the session (or proxy) associated with this fd */
unsigned char state; /* the state of this fd */
unsigned char ev; /* event seen in return of poll() : FD_POLL_* */
struct sockaddr *peeraddr; /* pointer to peer's network address, or NULL if unset */
* It returns 0.
*/
int event_accept(int fd) {
- struct listener *l = (struct listener *)fdtab[fd].owner;
+ struct listener *l = fdtab[fd].owner;
struct proxy *p = (struct proxy *)l->private; /* attached frontend */
struct session *s;
struct http_txn *txn;
fdtab[fd].cb[DIR_RD].f = listener->accept;
fdtab[fd].cb[DIR_WR].f = NULL; /* never called */
fdtab[fd].cb[DIR_RD].b = fdtab[fd].cb[DIR_WR].b = NULL;
- fdtab[fd].owner = (struct task *)listener; /* reference the listener instead of a task */
+ fdtab[fd].owner = listener; /* reference the listener instead of a task */
fdtab[fd].state = FD_STLISTEN;
fdtab[fd].peeraddr = NULL;
fdtab[fd].peerlen = 0;
fdtab[fd].cb[DIR_RD].f = listener->accept;
fdtab[fd].cb[DIR_WR].f = NULL; /* never called */
fdtab[fd].cb[DIR_RD].b = fdtab[fd].cb[DIR_WR].b = NULL;
- fdtab[fd].owner = (struct task *)listener; /* reference the listener instead of a task */
+ fdtab[fd].owner = listener; /* reference the listener instead of a task */
fdtab[fd].state = FD_STLISTEN;
fdtab[fd].peeraddr = NULL;
fdtab[fd].peerlen = 0;
* as with TCP which can fall under attack.
*/
int uxst_event_accept(int fd) {
- struct listener *l = (struct listener *)fdtab[fd].owner;
+ struct listener *l = fdtab[fd].owner;
struct session *s;
struct task *t;
int cfd;