Skip to content

Commit 41cc1fe

Browse files
einval22wlallemand
authored andcommitted
MINOR: startup: prefix prepare_master and run_master with mworker_*
This patch prepares the move of prepare_master() and run_master() definitions into mworker.c. So, let's at first prefix its names with mworker_*.
1 parent af64242 commit 41cc1fe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/haproxy.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,7 +1965,7 @@ static void generate_random_cluster_secret()
19651965
* CLI at worker side (worker can send its status to master).It only returns if
19661966
* everything is OK. If something fails, it exits.
19671967
*/
1968-
static void prepare_master()
1968+
static void mworker_prepare_master()
19691969
{
19701970
struct mworker_proc *tmproc;
19711971

@@ -2004,7 +2004,7 @@ static void prepare_master()
20042004
LIST_APPEND(&proc_list, &tmproc->list);
20052005
}
20062006

2007-
static void run_master()
2007+
static void mworker_run_master()
20082008
{
20092009
struct mworker_proc *child, *it;
20102010

@@ -3058,7 +3058,7 @@ static void run_master_in_recovery_mode(int argc, char **argv)
30583058

30593059
step_init_4();
30603060
/* enter in master polling loop */
3061-
run_master();
3061+
mworker_run_master();
30623062
}
30633063

30643064
/* parse conf in disovery mode and set modes from config */
@@ -3758,7 +3758,7 @@ int main(int argc, char **argv)
37583758
* setenv("HAPROXY_MWORKER", "1", 1).
37593759
*/
37603760
if (global.mode & MODE_MWORKER)
3761-
prepare_master();
3761+
mworker_prepare_master();
37623762

37633763
/* If we are in a daemon mode and we might be also in master-worker mode:
37643764
* we should do daemonization fork here to put the main process (which
@@ -3890,7 +3890,7 @@ int main(int argc, char **argv)
38903890

38913891
/* Master enters in its polling loop */
38923892
if (master) {
3893-
run_master();
3893+
mworker_run_master();
38943894
/* never get there in master context */
38953895
}
38963896

0 commit comments

Comments
 (0)