From: Cyril Bonté Date: Fri, 4 Dec 2015 02:07:06 +0000 (+0100) Subject: BUG/MEDIUM: checks: email-alert not working when declared in defaults X-Git-Tag: v1.7-dev1~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e0847045a236e67f6a5bf83ae54971409892115;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: checks: email-alert not working when declared in defaults Tommy Atkinson and Sylvain Faivre reported that email alerts didn't work when they were declared in the defaults section. This is due to the use of an internal attribute which is set once an email-alert is at least partially configured. But this attribute was not propagated to the current proxy during the configuration parsing. Not that the issue doesn't occur if "email-alert myhostname" is configured in the defaults section. This fix must be backported to 1.6. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 44070a541e..9ebae2cfad 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2804,6 +2804,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) if (defproxy.email_alert.myhostname) curproxy->email_alert.myhostname = strdup(defproxy.email_alert.myhostname); curproxy->email_alert.level = defproxy.email_alert.level; + curproxy->email_alert.set = defproxy.email_alert.set; goto out; }