From: Emeric Brun Date: Thu, 17 Oct 2019 14:45:56 +0000 (+0200) Subject: CLEANUP: bind: handle warning label on bind keywords parsing. X-Git-Tag: v2.1-dev3~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0655c9b22213a0f5716183106d86a995e672d19b;p=thirdparty%2Fhaproxy.git CLEANUP: bind: handle warning label on bind keywords parsing. All bind keyword parsing message were show as alerts. With this patch if the message is flagged only with ERR_WARN and not ERR_ALERT it will show a label [WARNING] and not [ALERT]. --- diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c index 6bece743d6..09b172724c 100644 --- a/src/cfgparse-listen.c +++ b/src/cfgparse-listen.c @@ -604,7 +604,10 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) if (code) { if (err && *err) { indent_msg(&err, 2); - ha_alert("parsing [%s:%d] : '%s %s' : %s\n", file, linenum, args[0], args[1], err); + if (((code & (ERR_WARN|ERR_ALERT)) == ERR_WARN)) + ha_warning("parsing [%s:%d] : '%s %s' : %s\n", file, linenum, args[0], args[1], err); + else + ha_alert("parsing [%s:%d] : '%s %s' : %s\n", file, linenum, args[0], args[1], err); } else ha_alert("parsing [%s:%d] : '%s %s' : error encountered while processing '%s'.\n",