]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: proxy: respect the proper format string in sig_pause/sig_listen
authorWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 17:26:27 +0000 (19:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 17:26:27 +0000 (19:26 +0200)
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

index 3f8e71ee648b0ce11cf7e8a15ebaaa34bebc48b4..3924df1d528b30fca16e2df9ad155d1bc82ac19e 100644 (file)
@@ -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);
        }
 }