From: Willy Tarreau Date: Thu, 5 Jul 2012 21:36:42 +0000 (+0200) Subject: REORG/MEDIUM: fd: get rid of FD_STLISTEN X-Git-Tag: v1.5-dev12~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed8f61407840dad15d06cb0df6f41b690d34d741;p=thirdparty%2Fhaproxy.git REORG/MEDIUM: fd: get rid of FD_STLISTEN This state was only used so that ev_sepoll did not match FD_STERROR, which changed in previous patch. We can now safely remove this state. --- diff --git a/include/types/fd.h b/include/types/fd.h index c75734512b..5d5c5ed8ee 100644 --- a/include/types/fd.h +++ b/include/types/fd.h @@ -32,7 +32,6 @@ #include /* different possible states for the fd */ -#define FD_STLISTEN 1 #define FD_STCONN 2 #define FD_STREADY 3 #define FD_STERROR 4 diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 1d38b3caa6..7da152a0d6 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -818,7 +818,7 @@ 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].state = FD_STLISTEN; + fdtab[fd].state = 0; /* anything will do, but avoid FD_STERROR */ fdtab[fd].flags = FD_FL_TCP | ((listener->options & LI_O_NOLINGER) ? FD_FL_TCP_NOLING : 0); fdtab[fd].cb[DIR_RD].f = listener->proto->accept; fdtab[fd].cb[DIR_WR].f = NULL; /* never called */ diff --git a/src/proto_uxst.c b/src/proto_uxst.c index 2b4c4de5e0..35e48fd066 100644 --- a/src/proto_uxst.c +++ b/src/proto_uxst.c @@ -265,7 +265,7 @@ static int uxst_bind_listener(struct listener *listener, char *errmsg, int errle fdtab[fd].cb[DIR_RD].f = listener->proto->accept; fdtab[fd].cb[DIR_WR].f = NULL; /* never called */ fdtab[fd].owner = listener; /* reference the listener instead of a task */ - fdtab[fd].state = FD_STLISTEN; + fdtab[fd].state = 0; /* anything will do, but avoid FD_STERROR */ return ERR_NONE; err_rename: ret = rename(backname, path);