]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mworker: doesn't launch the program postparser
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 10 Nov 2021 14:10:00 +0000 (15:10 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 10 Nov 2021 14:53:01 +0000 (15:53 +0100)
When in wait mode, the mworker-prog postparser is launched, but
unfortunately the child structure doesn't contain all required
information to be able to launch the test.

This test is only required when doing a configuration parsing.

Must be backported as far as 2.0.

src/mworker-prog.c

index 5ecd3df36b72db9450532404333554c0128774a3..75f64c5a988cb7f6987932c92d85ea87f9b9d316 100644 (file)
@@ -328,6 +328,11 @@ int cfg_program_postparser()
        int err_code = 0;
        struct mworker_proc *child;
 
+       /* we only need to check this during configuration parsing,
+        * wait mode doesn't have the complete description of a program */
+       if (global.mode & MODE_MWORKER_WAIT)
+               return err_code;
+
        list_for_each_entry(child, &proc_list, list) {
                if (child->reloads == 0 && (child->options & PROC_O_TYPE_PROG)) {
                        if (child->command == NULL) {