From 0a002df2c24a601aa6557b95598d275e3593bb6a Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 9 Oct 2020 19:26:27 +0200 Subject: [PATCH] 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. --- src/haproxy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index 3f8e71e..3924df1 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); } } -- 1.7.10.4