mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
BUG/MINOR: lua: Fix bitwise logic for hlua_server_check_* functions.
The logical operations were inverted so enable/disable operations did the opposite. The bug is present since 1.7 so the fix should be backported there.
This commit is contained in:
parent
174dfe55a0
commit
ceee933862
@ -662,7 +662,7 @@ int hlua_server_check_enable(lua_State *L)
|
|||||||
|
|
||||||
sv = hlua_check_server(L, 1);
|
sv = hlua_check_server(L, 1);
|
||||||
if (sv->check.state & CHK_ST_CONFIGURED) {
|
if (sv->check.state & CHK_ST_CONFIGURED) {
|
||||||
sv->check.state &= ~CHK_ST_ENABLED;
|
sv->check.state |= CHK_ST_ENABLED;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -673,7 +673,7 @@ int hlua_server_check_disable(lua_State *L)
|
|||||||
|
|
||||||
sv = hlua_check_server(L, 1);
|
sv = hlua_check_server(L, 1);
|
||||||
if (sv->check.state & CHK_ST_CONFIGURED) {
|
if (sv->check.state & CHK_ST_CONFIGURED) {
|
||||||
sv->check.state |= CHK_ST_ENABLED;
|
sv->check.state &= ~CHK_ST_ENABLED;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user