mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
CLEANUP: assorted typo fixes in the code and comments
This is 9th iteration of typo fixes
This commit is contained in:
parent
4289f7525a
commit
c02a23f981
24
src/checks.c
24
src/checks.c
@ -1061,7 +1061,7 @@ static void tcpcheck_expect_onerror_message(struct buffer *msg, struct check *ch
|
||||
* 1. if info field is already provided, copy it
|
||||
* 2. if the expect rule provides an onerror log-format string,
|
||||
* use it to produce the message
|
||||
* 3. the expect rule is part of a protcol check (http, redis, mysql...), do nothing
|
||||
* 3. the expect rule is part of a protocol check (http, redis, mysql...), do nothing
|
||||
* 4. Otherwise produce the generic tcp-check info message
|
||||
*/
|
||||
if (istlen(info)) {
|
||||
@ -1149,7 +1149,7 @@ static void tcpcheck_expect_onsuccess_message(struct buffer *msg, struct check *
|
||||
* 1. if info field is already provided, copy it
|
||||
* 2. if the expect rule provides an onsucces log-format string,
|
||||
* use it to produce the message
|
||||
* 3. the expect rule is part of a protcol check (http, redis, mysql...), do nothing
|
||||
* 3. the expect rule is part of a protocol check (http, redis, mysql...), do nothing
|
||||
* 4. Otherwise produce the generic tcp-check info message
|
||||
*/
|
||||
if (istlen(info))
|
||||
@ -2080,8 +2080,8 @@ static enum tcpcheck_eval_ret tcpcheck_eval_send(struct check *check, struct tcp
|
||||
|
||||
}
|
||||
|
||||
/* Try to reveice data before evaluting a tcp-check expect rule. Returns
|
||||
* TCPCHK_EVAL_WAIT if it is already subcribed on receive events or if nothing
|
||||
/* Try to receive data before evaluating a tcp-check expect rule. Returns
|
||||
* TCPCHK_EVAL_WAIT if it is already subscribed on receive events or if nothing
|
||||
* was received, TCPCHK_EVAL_CONTINUE to evaluate the expect rule or
|
||||
* TCPCHK_EVAL_STOP if an error occurred.
|
||||
*/
|
||||
@ -2582,7 +2582,7 @@ static enum tcpcheck_eval_ret tcpcheck_eval_expect(struct check *check, struct t
|
||||
}
|
||||
|
||||
/* Evaluates a TCPCHK_ACT_ACTION_KW rule. Returns TCPCHK_EVAL_CONTINUE to
|
||||
* evaluate the next rule or TCPCHK_EVAL_STOP if an error occurred. It nevers
|
||||
* evaluate the next rule or TCPCHK_EVAL_STOP if an error occurred. It never
|
||||
* waits.
|
||||
*/
|
||||
static enum tcpcheck_eval_ret tcpcheck_eval_action_kw(struct check *check, struct tcpcheck_rule *rule)
|
||||
@ -3728,7 +3728,7 @@ static struct tcpcheck_rule *parse_tcpcheck_connect(char **args, int cur_arg, st
|
||||
continue;
|
||||
|
||||
memprintf(errmsg, "first step MUST also be a 'connect', "
|
||||
"optionnaly preceded by a 'set-var', an 'unset-var' or a 'comment', "
|
||||
"optionally preceded by a 'set-var', an 'unset-var' or a 'comment', "
|
||||
"when there is a 'connect' step in the tcp-check ruleset");
|
||||
goto error;
|
||||
}
|
||||
@ -4431,7 +4431,7 @@ static struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, str
|
||||
if (strcmp(args[cur_arg+1], "value-lf") == 0)
|
||||
flags |= TCPCHK_EXPT_FL_HTTP_HVAL_FMT;
|
||||
|
||||
/* Parse the value pattern, optionnal */
|
||||
/* Parse the value pattern, optional */
|
||||
if (strcmp(args[cur_arg+2], "-m") == 0) {
|
||||
cur_arg += 2;
|
||||
if (!*(args[cur_arg+1])) {
|
||||
@ -4919,7 +4919,7 @@ static int tcpcheck_add_http_rule(struct tcpcheck_rule *chk, struct tcpcheck_rul
|
||||
*/
|
||||
|
||||
if (chk->action == TCPCHK_ACT_SEND && (chk->send.http.flags & TCPCHK_SND_HTTP_FROM_OPT)) {
|
||||
/* Tries to add an implcit http-check send rule from an "option httpchk" line.
|
||||
/* Tries to add an implicit http-check send rule from an "option httpchk" line.
|
||||
* First, the first rule is retrieved, skipping the first CONNECT, if any, and
|
||||
* following tests are performed :
|
||||
*
|
||||
@ -4929,7 +4929,7 @@ static int tcpcheck_add_http_rule(struct tcpcheck_rule *chk, struct tcpcheck_rul
|
||||
* 2- If it is another implicit send rule, it is replaced with the new one.
|
||||
*
|
||||
* 3- Otherwise, it means it is an explicit send rule. In this case we merge
|
||||
* both, overwritting the old send rule (the explicit one) with info of the
|
||||
* both, overwriting the old send rule (the explicit one) with info of the
|
||||
* new send rule (the implicit one).
|
||||
*/
|
||||
r = get_first_tcpcheck_rule(rules);
|
||||
@ -5372,7 +5372,7 @@ static int init_srv_agent_check(struct server *srv)
|
||||
if (!srv->do_agent)
|
||||
goto out;
|
||||
|
||||
/* If there is no connect rule preceeding all send / expect rules, an
|
||||
/* If there is no connect rule preceding all send / expect rules, an
|
||||
* implicit one is inserted before all others.
|
||||
*/
|
||||
chk = get_first_tcpcheck_rule(srv->agent.tcpcheck_rules);
|
||||
@ -5473,7 +5473,7 @@ static int check_proxy_tcpcheck(struct proxy *px)
|
||||
|
||||
/* For all ruleset: */
|
||||
|
||||
/* If there is no connect rule preceeding all send / expect rules, an
|
||||
/* If there is no connect rule preceding all send / expect rules, an
|
||||
* implicit one is inserted before all others.
|
||||
*/
|
||||
chk = get_first_tcpcheck_rule(&px->tcpcheck_rules);
|
||||
@ -6351,7 +6351,7 @@ int proxy_parse_ssl_hello_chk_opt(char **args, int cur_arg, struct proxy *curpx,
|
||||
* Check RFC 2246 (TLSv1.0) sections A.3 and A.4 for details.
|
||||
*/
|
||||
static char sslv3_client_hello[] = {
|
||||
"16" /* ContentType : 0x16 = Hanshake */
|
||||
"16" /* ContentType : 0x16 = Handshake */
|
||||
"0300" /* ProtocolVersion : 0x0300 = SSLv3 */
|
||||
"0079" /* ContentLength : 0x79 bytes after this one */
|
||||
"01" /* HanshakeType : 0x01 = CLIENT HELLO */
|
||||
|
@ -172,7 +172,7 @@ int chunk_appendf(struct buffer *chk, const char *fmt, ...)
|
||||
|
||||
/*
|
||||
* Encode chunk <src> into chunk <dst>, respecting the limit of at most
|
||||
* chk->size chars. Replace non-printable or special chracters with "&#%d;".
|
||||
* chk->size chars. Replace non-printable or special characters with "&#%d;".
|
||||
* If the chk->len is over, nothing is added. Returns the new chunk size.
|
||||
*/
|
||||
int chunk_htmlencode(struct buffer *dst, struct buffer *src)
|
||||
|
10
src/hlua.c
10
src/hlua.c
@ -343,7 +343,7 @@ __LJMP static const char *hlua_traceback(lua_State *L)
|
||||
|
||||
/* This function check the number of arguments available in the
|
||||
* stack. If the number of arguments available is not the same
|
||||
* then <nb> an error is throwed.
|
||||
* then <nb> an error is thrown.
|
||||
*/
|
||||
__LJMP static inline void check_args(lua_State *L, int nb, char *fcn)
|
||||
{
|
||||
@ -403,7 +403,7 @@ static int hlua_arg2lua(lua_State *L, const struct arg *arg)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* This function take one entrie in an LUA stack at the index "ud",
|
||||
/* This function take one entry in an LUA stack at the index "ud",
|
||||
* and try to convert it in an HAProxy argument entry. This is useful
|
||||
* with sample fetch wrappers. The input arguments are given to the
|
||||
* lua wrapper and converted as arg list by the function.
|
||||
@ -588,7 +588,7 @@ static int hlua_lua2smp(lua_State *L, int ud, struct sample *smp)
|
||||
* is in accord with the expected argp defined by the "mask". The function
|
||||
* returns true or false. It can be adjust the types if there compatibles.
|
||||
*
|
||||
* This function assumes thant the argp argument contains ARGM_NBARGS + 1
|
||||
* This function assumes that the argp argument contains ARGM_NBARGS + 1
|
||||
* entries.
|
||||
*/
|
||||
__LJMP int hlua_lua2arg_check(lua_State *L, int first, struct arg *argp,
|
||||
@ -802,7 +802,7 @@ __LJMP int hlua_lua2arg_check(lua_State *L, int first, struct arg *argp,
|
||||
}
|
||||
|
||||
/*
|
||||
* The following functions are used to make correspondance between the the
|
||||
* The following functions are used to make correspondence between the the
|
||||
* executed lua pointer and the "struct hlua *" that contain the context.
|
||||
*
|
||||
* - hlua_gethlua : return the hlua context associated with an lua_State.
|
||||
@ -1337,7 +1337,7 @@ static int hlua_set_map(lua_State *L)
|
||||
|
||||
/* A class is a lot of memory that contain data. This data can be a table,
|
||||
* an integer or user data. This data is associated with a metatable. This
|
||||
* metatable have an original version registred in the global context with
|
||||
* metatable have an original version registered in the global context with
|
||||
* the name of the object (_G[<name>] = <metable> ).
|
||||
*
|
||||
* A metable is a table that modify the standard behavior of a standard
|
||||
|
@ -71,7 +71,7 @@ static void release_http_action(struct act_rule *rule)
|
||||
/* This function executes one of the set-{method,path,query,uri} actions. It
|
||||
* builds a string in the trash from the specified format string. It finds
|
||||
* the action to be performed in <.action>, previously filled by function
|
||||
* parse_set_req_line(). The replacement action is excuted by the function
|
||||
* parse_set_req_line(). The replacement action is executed by the function
|
||||
* http_action_set_req_line(). On success, it returns ACT_RET_CONT. If an error
|
||||
* occurs while soft rewrites are enabled, the action is canceled, but the rule
|
||||
* processing continue. Otherwsize ACT_RET_ERR is returned.
|
||||
@ -1071,7 +1071,7 @@ static enum act_parse_ret parse_http_set_log_level(const char **args, int *orig_
|
||||
/* This function executes a early-hint action. It adds an HTTP Early Hint HTTP
|
||||
* 103 response header with <.arg.http.str> name and with a value built
|
||||
* according to <.arg.http.fmt> log line format. If it is the first early-hint
|
||||
* rule of a serie, the 103 response start-line is added first. At the end, if
|
||||
* rule of series, the 103 response start-line is added first. At the end, if
|
||||
* the next rule is not an early-hint rule or if it is the last rule, the EOH
|
||||
* block is added to terminate the response. On success, it returns
|
||||
* ACT_RET_CONT. If an error occurs while soft rewrites are enabled, the action
|
||||
@ -1148,7 +1148,7 @@ static enum act_return http_action_early_hint(struct act_rule *rule, struct prox
|
||||
/* This function executes a set-header or add-header actions. It builds a string
|
||||
* in the trash from the specified format string. It finds the action to be
|
||||
* performed in <.action>, previously filled by function parse_set_header(). The
|
||||
* replacement action is excuted by the function http_action_set_header(). On
|
||||
* replacement action is executed by the function http_action_set_header(). On
|
||||
* success, it returns ACT_RET_CONT. If an error occurs while soft rewrites are
|
||||
* enabled, the action is canceled, but the rule processing continue. Otherwsize
|
||||
* ACT_RET_ERR is returned.
|
||||
@ -1271,7 +1271,7 @@ static enum act_parse_ret parse_http_set_header(const char **args, int *orig_arg
|
||||
/* This function executes a replace-header or replace-value actions. It
|
||||
* builds a string in the trash from the specified format string. It finds
|
||||
* the action to be performed in <.action>, previously filled by function
|
||||
* parse_replace_header(). The replacement action is excuted by the function
|
||||
* parse_replace_header(). The replacement action is executed by the function
|
||||
* http_action_replace_header(). On success, it returns ACT_RET_CONT. If an error
|
||||
* occurs while soft rewrites are enabled, the action is canceled, but the rule
|
||||
* processing continue. Otherwsize ACT_RET_ERR is returned.
|
||||
@ -2019,7 +2019,7 @@ static int check_http_return_action(struct act_rule *rule, struct proxy *px, cha
|
||||
*
|
||||
* - action 0 : dummy response, no payload
|
||||
* - action 1 : implicit error message depending on the status code or explicit one
|
||||
* - action 2 : explicit file oject ('file' argument)
|
||||
* - action 2 : explicit file object ('file' argument)
|
||||
* - action 3 : explicit log-format string ('content' argument)
|
||||
*
|
||||
* The content-type must be defined for non-empty payload. It is ignored for
|
||||
|
10
src/mux_h1.c
10
src/mux_h1.c
@ -356,7 +356,7 @@ static void h1_trace(enum trace_level level, uint64_t mask, const struct trace_s
|
||||
* - if the input buffer failed to be allocated or is full , we must not try
|
||||
* to receive
|
||||
* - if he input processing is busy waiting for the output side, we may
|
||||
* attemp to receive
|
||||
* attempt to receive
|
||||
* - otherwise must may not attempt to receive
|
||||
*/
|
||||
static inline int h1_recv_allowed(const struct h1c *h1c)
|
||||
@ -845,7 +845,7 @@ static void h1_set_cli_conn_mode(struct h1s *h1s, struct h1m *h1m)
|
||||
}
|
||||
else if (!(h1m->flags & H1_MF_CONN_KAL) &&
|
||||
(fe->options & PR_O_HTTP_MODE) == PR_O_HTTP_CLO) {
|
||||
/* no explict keep-alive and option httpclose => close */
|
||||
/* no explicit keep-alive and option httpclose => close */
|
||||
h1s->flags = (h1s->flags & ~H1S_F_WANT_MSK) | H1S_F_WANT_CLO;
|
||||
TRACE_STATE("force close mode (resp)", H1_EV_TX_DATA|H1_EV_TX_HDRS, h1s->h1c->conn, h1s);
|
||||
}
|
||||
@ -1136,7 +1136,7 @@ static void h1_set_req_tunnel_mode(struct h1s *h1s)
|
||||
|
||||
/*
|
||||
* Switch the response to tunnel mode. This function must only be called on
|
||||
* successfull replies to CONNECT requests or on protocol switching. In this
|
||||
* successful replies to CONNECT requests or on protocol switching. In this
|
||||
* last case, this function takes care to switch the request to tunnel mode if
|
||||
* possible. On the server side, if the request is not finished, the mux is mark
|
||||
* as busy on input.
|
||||
@ -1779,7 +1779,7 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun
|
||||
}
|
||||
else if ((h1m->flags & H1_MF_RESP) &&
|
||||
((h1s->meth == HTTP_METH_CONNECT && h1s->status == 200) || h1s->status == 101)) {
|
||||
/* a successfull reply to a CONNECT or a protocol switching is sent
|
||||
/* a successful reply to a CONNECT or a protocol switching is sent
|
||||
* to the client. Switch the response to tunnel mode.
|
||||
*/
|
||||
h1_set_res_tunnel_mode(h1s);
|
||||
@ -3104,7 +3104,7 @@ REGISTER_CONFIG_POSTPARSER("h1-headers-map", cfg_h1_headers_case_adjust_postpars
|
||||
|
||||
|
||||
/****************************************/
|
||||
/* MUX initialization and instanciation */
|
||||
/* MUX initialization and instantiation */
|
||||
/****************************************/
|
||||
|
||||
/* The mux operations */
|
||||
|
14
src/peers.c
14
src/peers.c
@ -159,7 +159,7 @@ struct peer_prep_params {
|
||||
/*******************************/
|
||||
/* stick table sync mesg types */
|
||||
/* Note: ids >= 128 contains */
|
||||
/* id message cotains data */
|
||||
/* id message contains data */
|
||||
/*******************************/
|
||||
#define PEER_MSG_STKT_UPDATE 0x80
|
||||
#define PEER_MSG_STKT_INCUPDATE 0x81
|
||||
@ -280,7 +280,7 @@ static const char *statuscode_str(int statuscode)
|
||||
|
||||
/* This function encode an uint64 to 'dynamic' length format.
|
||||
The encoded value is written at address *str, and the
|
||||
caller must assure that size after *str is large enought.
|
||||
caller must assure that size after *str is large enough.
|
||||
At return, the *str is set at the next Byte after then
|
||||
encoded integer. The function returns then length of the
|
||||
encoded integer in Bytes */
|
||||
@ -449,7 +449,7 @@ static int peer_prepare_updatemsg(char *msg, size_t size, struct peer_prep_param
|
||||
|
||||
/* construct message */
|
||||
|
||||
/* check if we need to send the update identifer */
|
||||
/* check if we need to send the update identifier */
|
||||
if (!st->last_pushed || updateid < st->last_pushed || ((updateid - st->last_pushed) != 1)) {
|
||||
use_identifier = 1;
|
||||
}
|
||||
@ -1302,7 +1302,7 @@ static inline int peer_send_teach_stage2_msgs(struct appctx *appctx, struct peer
|
||||
* was encountered.
|
||||
* <exp> must be set if the stick-table entry expires.
|
||||
* <updt> must be set for PEER_MSG_STKT_UPDATE or PEER_MSG_STKT_UPDATE_TIMED stick-table
|
||||
* messages, in this case the stick-table udpate message is received with a stick-table
|
||||
* messages, in this case the stick-table update message is received with a stick-table
|
||||
* update ID.
|
||||
* <totl> is the length of the stick-table update message computed upon receipt.
|
||||
*/
|
||||
@ -1778,7 +1778,7 @@ static inline int peer_treat_awaited_msg(struct appctx *appctx, struct peer *pee
|
||||
struct shared_table *st;
|
||||
/* Reset message: remote need resync */
|
||||
|
||||
/* prepare tables fot a global push */
|
||||
/* prepare tables for a global push */
|
||||
for (st = peer->tables; st; st = st->next) {
|
||||
st->teaching_origin = st->last_pushed = st->table->update;
|
||||
st->flags = 0;
|
||||
@ -1871,7 +1871,7 @@ static inline int peer_treat_awaited_msg(struct appctx *appctx, struct peer *pee
|
||||
/*
|
||||
* Send any message to <peer> peer.
|
||||
* Returns 1 if succeeded, or -1 or 0 if failed.
|
||||
* -1 means an internal error occured, 0 is for a peer protocol error leading
|
||||
* -1 means an internal error occurred, 0 is for a peer protocol error leading
|
||||
* to a peer state change (from the peer I/O handler point of view).
|
||||
*/
|
||||
static inline int peer_send_msgs(struct appctx *appctx, struct peer *peer)
|
||||
@ -2855,7 +2855,7 @@ static struct dcache_tx *new_dcache_tx(size_t max_entries)
|
||||
/*
|
||||
* Allocate a cache of dictionary entries with <name> as name and <max_entries>
|
||||
* as maximum of entries.
|
||||
* Return the dictionay cache if succeeded, NULL if not.
|
||||
* Return the dictionary cache if succeeded, NULL if not.
|
||||
* Must be deallocated calling free_dcache().
|
||||
*/
|
||||
static struct dcache *new_dcache(size_t max_entries)
|
||||
|
@ -1277,7 +1277,7 @@ static struct srv_kw_list srv_kws = { "ALL", { }, {
|
||||
INITCALL1(STG_REGISTER, srv_register_keywords, &srv_kws);
|
||||
|
||||
/* Recomputes the server's eweight based on its state, uweight, the current time,
|
||||
* and the proxy's algorihtm. To be used after updating sv->uweight. The warmup
|
||||
* and the proxy's algorithm. To be used after updating sv->uweight. The warmup
|
||||
* state is automatically disabled if the time is elapsed. If <must_update> is
|
||||
* not zero, the update will be propagated immediately.
|
||||
*
|
||||
@ -2248,7 +2248,7 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
|
||||
len2mask6(mask, &opt->pref_net[opt->pref_net_nb].mask.in6);
|
||||
opt->pref_net[opt->pref_net_nb].family = AF_INET6;
|
||||
} else {
|
||||
/* All network conversions fail, retrun error. */
|
||||
/* All network conversions fail, return error. */
|
||||
ha_alert("parsing [%s:%d]: '%s': invalid network '%s'.\n",
|
||||
file, linenum, args[cur_arg], p);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
|
@ -2292,7 +2292,7 @@ const void *my_memmem(const void *haystack, size_t haystacklen, const void *need
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* get length of the initial segment consiting entirely of bytes in <accept> */
|
||||
/* get length of the initial segment consisting entirely of bytes in <accept> */
|
||||
size_t my_memspn(const void *str, size_t len, const void *accept, size_t acceptlen)
|
||||
{
|
||||
size_t ret = 0;
|
||||
@ -2304,7 +2304,7 @@ size_t my_memspn(const void *str, size_t len, const void *accept, size_t acceptl
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* get length of the initial segment consiting entirely of bytes not in <rejcet> */
|
||||
/* get length of the initial segment consisting entirely of bytes not in <rejcet> */
|
||||
size_t my_memcspn(const void *str, size_t len, const void *reject, size_t rejectlen)
|
||||
{
|
||||
size_t ret = 0;
|
||||
|
@ -970,7 +970,7 @@ static void sess_set_term_flags(struct stream *s)
|
||||
/* This function parses the use-service action ruleset. It executes
|
||||
* the associated ACL and set an applet as a stream or txn final node.
|
||||
* it returns ACT_RET_ERR if an error occurs, the proxy left in
|
||||
* consistent state. It returns ACT_RET_STOP in succes case because
|
||||
* consistent state. It returns ACT_RET_STOP in success case because
|
||||
* use-service must be a terminal action. Returns ACT_RET_YIELD
|
||||
* if the initialisation function require more data.
|
||||
*/
|
||||
@ -995,7 +995,7 @@ enum act_return process_use_service(struct act_rule *rule, struct proxy *px,
|
||||
else
|
||||
appctx = si_appctx(&s->si[1]);
|
||||
|
||||
/* Stops the applet sheduling, in case of the init function miss
|
||||
/* Stops the applet scheduling, in case of the init function miss
|
||||
* some data.
|
||||
*/
|
||||
si_stop_get(&s->si[1]);
|
||||
|
@ -294,7 +294,7 @@ static int ha_wurfl_init(void)
|
||||
// ebtree initialization
|
||||
global_wurfl.btree = EB_ROOT;
|
||||
|
||||
// checking if informations are valid WURFL data ( cap, vcaps, properties )
|
||||
// checking if information is valid WURFL data ( cap, vcaps, properties )
|
||||
list_for_each_entry(wi, &global_wurfl.information_list, list) {
|
||||
// check if information is already loaded looking into btree
|
||||
if (ebst_lookup(&global_wurfl.btree, wi->data.name) == NULL) {
|
||||
@ -736,7 +736,7 @@ static const char *ha_wurfl_retrieve_header(const char *header_name, const void
|
||||
//the header is searched from the beginning
|
||||
ctx.blk = NULL;
|
||||
|
||||
// We could skip this chek since ha_wurfl_retrieve_header is called from inside
|
||||
// We could skip this check since ha_wurfl_retrieve_header is called from inside
|
||||
// ha_wurfl_get()/ha_wurfl_get_all() that already perform the same check
|
||||
// We choose to keep it in case ha_wurfl_retrieve_header will be called directly
|
||||
htx = smp_prefetch_htx(smp, chn, NULL, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user