mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
MINOR: proxy: rename PR_CAP_LUA to PR_CAP_INT
This patch renames the proxy capability "LUA" to "INT" so it could be used for any internal proxy. Every proxy that are not user defined should use this flag.
This commit is contained in:
parent
b5f7b52968
commit
6bb77b9c64
@ -69,7 +69,7 @@ enum PR_SRV_STATE_FILE {
|
|||||||
#define PR_CAP_BE 0x0002
|
#define PR_CAP_BE 0x0002
|
||||||
#define PR_CAP_LISTEN (PR_CAP_FE|PR_CAP_BE)
|
#define PR_CAP_LISTEN (PR_CAP_FE|PR_CAP_BE)
|
||||||
#define PR_CAP_DEF 0x0004 /* defaults section */
|
#define PR_CAP_DEF 0x0004 /* defaults section */
|
||||||
#define PR_CAP_LUA 0x0008 /* internal proxy used by lua engine */
|
#define PR_CAP_INT 0x0008 /* internal proxy (used by lua engine) */
|
||||||
#define PR_CAP_LB 0x0010 /* load-balancing capabilities, i.e. listen/frontend/backend proxies */
|
#define PR_CAP_LB 0x0010 /* load-balancing capabilities, i.e. listen/frontend/backend proxies */
|
||||||
|
|
||||||
/* bits for proxy->options */
|
/* bits for proxy->options */
|
||||||
|
@ -9221,7 +9221,7 @@ void hlua_init(void) {
|
|||||||
hlua_states[1] = hlua_init_state(1);
|
hlua_states[1] = hlua_init_state(1);
|
||||||
|
|
||||||
/* Proxy and server configuration initialisation. */
|
/* Proxy and server configuration initialisation. */
|
||||||
socket_proxy = alloc_new_proxy("LUA-SOCKET", PR_CAP_FE|PR_CAP_BE|PR_CAP_LUA, &errmsg);
|
socket_proxy = alloc_new_proxy("LUA-SOCKET", PR_CAP_FE|PR_CAP_BE|PR_CAP_INT, &errmsg);
|
||||||
if (!socket_proxy) {
|
if (!socket_proxy) {
|
||||||
fprintf(stderr, "Lua init: %s\n", errmsg);
|
fprintf(stderr, "Lua init: %s\n", errmsg);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -1345,13 +1345,13 @@ void proxy_preset_defaults(struct proxy *defproxy)
|
|||||||
{
|
{
|
||||||
defproxy->mode = PR_MODE_TCP;
|
defproxy->mode = PR_MODE_TCP;
|
||||||
defproxy->disabled = 0;
|
defproxy->disabled = 0;
|
||||||
if (!(defproxy->cap & PR_CAP_LUA)) {
|
if (!(defproxy->cap & PR_CAP_INT)) {
|
||||||
defproxy->maxconn = cfg_maxpconn;
|
defproxy->maxconn = cfg_maxpconn;
|
||||||
defproxy->conn_retries = CONN_RETRIES;
|
defproxy->conn_retries = CONN_RETRIES;
|
||||||
}
|
}
|
||||||
defproxy->redispatch_after = 0;
|
defproxy->redispatch_after = 0;
|
||||||
defproxy->options = PR_O_REUSE_SAFE;
|
defproxy->options = PR_O_REUSE_SAFE;
|
||||||
if (defproxy->cap & PR_CAP_LUA)
|
if (defproxy->cap & PR_CAP_INT)
|
||||||
defproxy->options2 |= PR_O2_INDEPSTR;
|
defproxy->options2 |= PR_O2_INDEPSTR;
|
||||||
defproxy->max_out_conns = MAX_SRV_LIST;
|
defproxy->max_out_conns = MAX_SRV_LIST;
|
||||||
|
|
||||||
@ -1384,7 +1384,7 @@ void proxy_preset_defaults(struct proxy *defproxy)
|
|||||||
quic_transport_params_init(&defproxy->defsrv.quic_params, 0);
|
quic_transport_params_init(&defproxy->defsrv.quic_params, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (defproxy->cap & PR_CAP_LUA)
|
if (defproxy->cap & PR_CAP_INT)
|
||||||
defproxy->timeout.connect = 5000;
|
defproxy->timeout.connect = 5000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1481,7 +1481,7 @@ struct proxy *alloc_new_proxy(const char *name, unsigned int cap, char **errmsg)
|
|||||||
curproxy->id = strdup(name);
|
curproxy->id = strdup(name);
|
||||||
curproxy->cap = cap;
|
curproxy->cap = cap;
|
||||||
|
|
||||||
if (!(cap & PR_CAP_LUA))
|
if (!(cap & PR_CAP_INT))
|
||||||
proxy_store_name(curproxy);
|
proxy_store_name(curproxy);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
Loading…
Reference in New Issue
Block a user