]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] peers: the peer frontend must not emit any log
authorWilly Tarreau <w@1wt.eu>
Wed, 7 Sep 2011 16:41:08 +0000 (18:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Sep 2011 20:47:43 +0000 (22:47 +0200)
Peers' frontends must have logging disabled by default, which was not
the case, so logs were randomly emitted upon restart, sometimes causing
a new process to fail to replace the old one.

src/cfgparse.c
src/proxy.c

index 45d9677d8cd653c1ca9b047d94d76aaee4fac0fb..f63c615419a311fee52310899bacd7615526fcc4 100644 (file)
@@ -1040,7 +1040,6 @@ void init_default_instance()
        defproxy.state = PR_STNEW;
        defproxy.maxconn = cfg_maxpconn;
        defproxy.conn_retries = CONN_RETRIES;
-       defproxy.logfac1 = defproxy.logfac2 = -1; /* log disabled */
 
        defproxy.defsrv.inter = DEF_CHKINTR;
        defproxy.defsrv.fastinter = 0;
index 9409d55430e034e3c4d79471243cfc0b20922202..7bbc6a7c9d3c4ebcec0a93216f0bf9a35033fb3c 100644 (file)
@@ -415,7 +415,7 @@ int proxy_cfg_ensure_no_http(struct proxy *curproxy)
 
 /* Perform the most basic initialization of a proxy :
  * memset(), list_init(*), reset_timeouts(*).
- * Any new proxy should be initialized via this function.
+ * Any new proxy or peer should be initialized via this function.
  */
 void init_new_proxy(struct proxy *p)
 {
@@ -440,6 +440,7 @@ void init_new_proxy(struct proxy *p)
        /* Timeouts are defined as -1 */
        proxy_reset_timeouts(p);
        p->tcp_rep.inspect_delay = TICK_ETERNITY;
+       p->logfac1 = p->logfac2 = -1; /* log disabled */
 }
 
 /*