MINOR: mworker: parse program only in MODE_DISCOVERY
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Thu, 10 Oct 2024 21:50:59 +0000 (23:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Oct 2024 20:02:39 +0000 (22:02 +0200)
commit45a284895ae6fcb6f9d3c8efa713008d7c7ffc56
tree247ff45c2a916c67ed47c312be1852d143170203
parentee7fc983200a326113614064e3681a6c4bd4b456
MINOR: mworker: parse program only in MODE_DISCOVERY

This patch is a part of series to reintroduce the program support in the new
master-worker architecture.

Master process launches external programs, so it needs to read program
section. Thus, it should be parsed in MODE_DISCOVERY. Worker does not need
program settings, so let's check the runtime mode in cfg_parse_program. Worker
should always skip this section.
src/mworker-prog.c