]> git.kaiwu.me - haproxy.git/commit
MINOR: mworker/cli: split mworker_cli_proxy_create
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Wed, 23 Oct 2024 15:29:10 +0000 (17:29 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 24 Oct 2024 09:32:20 +0000 (11:32 +0200)
commitddb829bb51b5e53d7b9fe3439ac5c8d5163dde2e
tree400d0380593f9a3aae4af59ba9cb678c74264a78
parenta0d727e0698d8b5f201667ffcd857824285b90d7
MINOR: mworker/cli: split mworker_cli_proxy_create

There are two parts in mworker_cli_proxy_create(): allocating and setting up
MASTER proxy and allocating and setting up servers on ipc_fd[0] of the
sockpairs shared with workers.

So, let's split mworker_cli_proxy_create() into two functions respectively.
Each of them takes **errmsg as an argument to write an error message, which may
be triggered by some subcalls. The content of this errmsg will allow to extend
the final alert message shown to user, if these new functions will fail.

The main goals of this split is to allow to move these two parts independantly
in future and makes the code of haproxy initialization in haproxy.c more
transparent.
include/haproxy/cli.h
src/cli.c
src/haproxy.c