CLEANUP: log: removing "log-balance" references
This is a complementary patch to 0e1f389fe9 ("DOC: config: removing "log-balance" references"): we properly removed all log-balance references in the doc but there remained some in the code, let's fix that. It could be backported in 2.9 with 0e1f389fe9
This commit is contained in:
parent
b46b81949f
commit
ddf66132f4
@ -51,7 +51,7 @@ static const char *common_kw_list[] = {
|
|||||||
"use-server", "force-persist", "ignore-persist", "force-persist",
|
"use-server", "force-persist", "ignore-persist", "force-persist",
|
||||||
"stick-table", "stick", "stats", "option", "default_backend",
|
"stick-table", "stick", "stats", "option", "default_backend",
|
||||||
"http-reuse", "monitor", "transparent", "maxconn", "backlog",
|
"http-reuse", "monitor", "transparent", "maxconn", "backlog",
|
||||||
"fullconn", "dispatch", "balance", "log-balance", "hash-type",
|
"fullconn", "dispatch", "balance", "hash-type",
|
||||||
"hash-balance-factor", "unique-id-format", "unique-id-header",
|
"hash-balance-factor", "unique-id-format", "unique-id-header",
|
||||||
"log-format", "log-format-sd", "log-tag", "log", "source", "usesrc",
|
"log-format", "log-format-sd", "log-tag", "log", "source", "usesrc",
|
||||||
"error-log-format",
|
"error-log-format",
|
||||||
|
10
src/log.c
10
src/log.c
@ -1349,7 +1349,7 @@ static int postcheck_log_backend(struct proxy *be)
|
|||||||
if (err_code & ERR_CODE)
|
if (err_code & ERR_CODE)
|
||||||
return err_code;
|
return err_code;
|
||||||
|
|
||||||
/* "log-balance hash" needs to compile its expression */
|
/* "balance log-hash" needs to compile its expression */
|
||||||
if ((be->lbprm.algo & BE_LB_ALGO) == BE_LB_ALGO_LH) {
|
if ((be->lbprm.algo & BE_LB_ALGO) == BE_LB_ALGO_LH) {
|
||||||
struct sample_expr *expr;
|
struct sample_expr *expr;
|
||||||
char *expr_str = NULL;
|
char *expr_str = NULL;
|
||||||
@ -1374,7 +1374,7 @@ static int postcheck_log_backend(struct proxy *be)
|
|||||||
*/
|
*/
|
||||||
memprintf(&expr_str, "str(dummy),%s", be->lbprm.arg_str);
|
memprintf(&expr_str, "str(dummy),%s", be->lbprm.arg_str);
|
||||||
if (!expr_str) {
|
if (!expr_str) {
|
||||||
memprintf(&msg, "memory error during converter list argument parsing (from \"log-balance hash\")");
|
memprintf(&msg, "memory error during converter list argument parsing (from \"balance log-hash\")");
|
||||||
err_code |= ERR_ALERT | ERR_FATAL;
|
err_code |= ERR_ALERT | ERR_FATAL;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
@ -1383,7 +1383,7 @@ static int postcheck_log_backend(struct proxy *be)
|
|||||||
be->conf.line,
|
be->conf.line,
|
||||||
&err_str, NULL, NULL);
|
&err_str, NULL, NULL);
|
||||||
if (!expr) {
|
if (!expr) {
|
||||||
memprintf(&msg, "%s (from converter list argument in \"log-balance hash\")", err_str);
|
memprintf(&msg, "%s (from converter list argument in \"balance log-hash\")", err_str);
|
||||||
ha_free(&err_str);
|
ha_free(&err_str);
|
||||||
err_code |= ERR_ALERT | ERR_FATAL;
|
err_code |= ERR_ALERT | ERR_FATAL;
|
||||||
ha_free(&expr_str);
|
ha_free(&expr_str);
|
||||||
@ -1398,7 +1398,7 @@ static int postcheck_log_backend(struct proxy *be)
|
|||||||
* error to prevent unexpected results during runtime.
|
* error to prevent unexpected results during runtime.
|
||||||
*/
|
*/
|
||||||
if (sample_casts[smp_expr_output_type(expr)][SMP_T_BIN] == NULL) {
|
if (sample_casts[smp_expr_output_type(expr)][SMP_T_BIN] == NULL) {
|
||||||
memprintf(&msg, "invalid output type at the end of converter list for \"log-balance hash\" directive");
|
memprintf(&msg, "invalid output type at the end of converter list for \"balance log-hash\" directive");
|
||||||
err_code |= ERR_ALERT | ERR_FATAL;
|
err_code |= ERR_ALERT | ERR_FATAL;
|
||||||
release_sample_expr(expr);
|
release_sample_expr(expr);
|
||||||
ha_free(&expr_str);
|
ha_free(&expr_str);
|
||||||
@ -2863,7 +2863,7 @@ static inline void __do_send_log_backend(struct proxy *be, struct log_header hdr
|
|||||||
else if ((be->lbprm.algo & BE_LB_ALGO) == BE_LB_ALGO_LH) {
|
else if ((be->lbprm.algo & BE_LB_ALGO) == BE_LB_ALGO_LH) {
|
||||||
struct sample result;
|
struct sample result;
|
||||||
|
|
||||||
/* log-balance hash */
|
/* balance log-hash */
|
||||||
memset(&result, 0, sizeof(result));
|
memset(&result, 0, sizeof(result));
|
||||||
result.data.type = SMP_T_STR;
|
result.data.type = SMP_T_STR;
|
||||||
result.flags = SMP_F_CONST;
|
result.flags = SMP_F_CONST;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user