From: Willy Tarreau Date: Fri, 9 Oct 2020 17:26:27 +0000 (+0200) Subject: BUG/MINOR: proxy: respect the proper format string in sig_pause/sig_listen X-Git-Tag: v2.3-dev6~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a002df2c24a601aa6557b95598d275e3593bb6a;p=thirdparty%2Fhaproxy.git BUG/MINOR: proxy: respect the proper format string in sig_pause/sig_listen When factoring out the pause/resume error messages in commit 775e00158 ("MAJOR: signals: use protocol_pause_all() and protocol_resume_all()") I forgot that ha_warning() and send_log() take a format string and not just a const string. No backport is needed, this is 2.3-dev. --- diff --git a/src/haproxy.c b/src/haproxy.c index 3f8e71ee64..3924df1d52 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -936,8 +936,8 @@ static void sig_pause(struct sig_handler *sh) { if (protocol_pause_all() & ERR_FATAL) { const char *msg = "Some proxies refused to pause, performing soft stop now.\n"; - ha_warning(msg); - send_log(NULL, LOG_WARNING, msg); + ha_warning("%s", msg); + send_log(NULL, LOG_WARNING, "%s", msg); soft_stop(); } pool_gc(NULL); @@ -950,8 +950,8 @@ static void sig_listen(struct sig_handler *sh) { if (protocol_resume_all() & ERR_FATAL) { const char *msg = "Some proxies refused to resume, probably due to a conflict on a listening port. You may want to try again after the conflicting application is stopped, otherwise a restart might be needed to resume safe operations.\n"; - ha_warning(msg); - send_log(NULL, LOG_WARNING, msg); + ha_warning("%s", msg); + send_log(NULL, LOG_WARNING, "%s", msg); } }