From: Willy Tarreau Date: Fri, 18 Jan 2013 09:51:07 +0000 (+0100) Subject: CLEANUP: config: set the maxaccept value for peers listeners earlier X-Git-Tag: v1.5-dev25~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=acf3bf94d03e5e27c51859c1ea91c943ed5de2be;p=thirdparty%2Fhaproxy.git CLEANUP: config: set the maxaccept value for peers listeners earlier Since we introduced bind_conf in peers, we can set maxaccept in a cleaner way at the proper time, let's do this to make the code more readable. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 1cdda34d1f..6b1034e7db 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1757,6 +1757,7 @@ int cfg_parse_peers(const char *file, int linenum, char **args, int kwm) } list_for_each_entry(l, &bind_conf->listeners, by_bind) { + l->maxaccept = 1; l->maxconn = ((struct proxy *)curpeers->peers_fe)->maxconn; l->backlog = ((struct proxy *)curpeers->peers_fe)->backlog; l->timeout = &((struct proxy *)curpeers->peers_fe)->timeout.client; @@ -7076,7 +7077,6 @@ out_uri_auth_compat: while (*last) { curpeers = *last; if (curpeers->peers_fe) { - LIST_NEXT(&curpeers->peers_fe->conf.listeners, struct listener *, by_fe)->maxaccept = 1; last = &curpeers->next; continue; }