mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-03 02:32:03 +00:00
CLEANUP: assorted typo fixes in the code and comments
This is 7th iteration of typo fixes
This commit is contained in:
parent
bb1b63c079
commit
d425950c68
@ -23,7 +23,7 @@
|
||||
#include "ebistree.h"
|
||||
|
||||
/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
|
||||
* It's the caller's reponsibility to use this function only on trees which
|
||||
* It's the caller's responsibility to use this function only on trees which
|
||||
* only contain zero-terminated strings. If none can be found, return NULL.
|
||||
*/
|
||||
struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x)
|
||||
|
@ -39,7 +39,7 @@ struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x);
|
||||
struct ebpt_node *ebis_insert(struct eb_root *root, struct ebpt_node *new);
|
||||
|
||||
/* Find the first occurrence of a length <len> string <x> in the tree <root>.
|
||||
* It's the caller's reponsibility to use this function only on trees which
|
||||
* It's the caller's responsibility to use this function only on trees which
|
||||
* only contain zero-terminated strings, and that no null character is present
|
||||
* in string <x> in the first <len> chars. If none can be found, return NULL.
|
||||
*/
|
||||
@ -55,7 +55,7 @@ ebis_lookup_len(struct eb_root *root, const char *x, unsigned int len)
|
||||
}
|
||||
|
||||
/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
|
||||
* It's the caller's reponsibility to use this function only on trees which
|
||||
* It's the caller's responsibility to use this function only on trees which
|
||||
* only contain zero-terminated strings. If none can be found, return NULL.
|
||||
*/
|
||||
static forceinline struct ebpt_node *__ebis_lookup(struct eb_root *root, const void *x)
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "ebsttree.h"
|
||||
|
||||
/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
|
||||
* It's the caller's reponsibility to use this function only on trees which
|
||||
* It's the caller's responsibility to use this function only on trees which
|
||||
* only contain zero-terminated strings. If none can be found, return NULL.
|
||||
*/
|
||||
struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x)
|
||||
|
@ -33,7 +33,7 @@ struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x);
|
||||
struct ebmb_node *ebst_insert(struct eb_root *root, struct ebmb_node *new);
|
||||
|
||||
/* Find the first occurrence of a length <len> string <x> in the tree <root>.
|
||||
* It's the caller's reponsibility to use this function only on trees which
|
||||
* It's the caller's responsibility to use this function only on trees which
|
||||
* only contain zero-terminated strings, and that no null character is present
|
||||
* in string <x> in the first <len> chars. If none can be found, return NULL.
|
||||
*/
|
||||
@ -49,7 +49,7 @@ ebst_lookup_len(struct eb_root *root, const char *x, unsigned int len)
|
||||
}
|
||||
|
||||
/* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
|
||||
* It's the caller's reponsibility to use this function only on trees which
|
||||
* It's the caller's responsibility to use this function only on trees which
|
||||
* only contain zero-terminated strings. If none can be found, return NULL.
|
||||
*/
|
||||
static forceinline struct ebmb_node *__ebst_lookup(struct eb_root *root, const void *x)
|
||||
|
@ -42,7 +42,7 @@
|
||||
* - FAIL : no mattern may ever match
|
||||
*
|
||||
* We assign values 0, 1 and 3 to FAIL, MISS and PASS respectively, so that we
|
||||
* can make use of standard arithmetics for the truth tables below :
|
||||
* can make use of standard arithmetic for the truth tables below :
|
||||
*
|
||||
* x | !x x&y | F(0) | M(1) | P(3) x|y | F(0) | M(1) | P(3)
|
||||
* ------+----- -----+------+------+----- -----+------+------+-----
|
||||
|
@ -39,7 +39,7 @@ struct applet {
|
||||
enum obj_type obj_type; /* object type = OBJ_TYPE_APPLET */
|
||||
/* 3 unused bytes here */
|
||||
char *name; /* applet's name to report in logs */
|
||||
int (*init)(struct appctx *, struct proxy *px, struct stream *strm); /* callback to init ressources, may be NULL.
|
||||
int (*init)(struct appctx *, struct proxy *px, struct stream *strm); /* callback to init resources, may be NULL.
|
||||
expect 1 if ok, 0 if an error occurs, -1 if miss data. */
|
||||
void (*fct)(struct appctx *); /* internal I/O handler, may never be NULL */
|
||||
void (*release)(struct appctx *); /* callback to release resources, may be NULL */
|
||||
@ -114,7 +114,7 @@ struct appctx {
|
||||
struct cache_entry *entry; /* Entry to be sent from cache. */
|
||||
unsigned int sent; /* The number of bytes already sent for this cache entry. */
|
||||
unsigned int offset; /* start offset of remaining data relative to beginning of the next block */
|
||||
unsigned int rem_data; /* Remaing bytes for the last data block (HTX only, 0 means process next block) */
|
||||
unsigned int rem_data; /* Remaining bytes for the last data block (HTX only, 0 means process next block) */
|
||||
struct shared_block *next; /* The next block of data to be sent for this cache entry. */
|
||||
} cache;
|
||||
/* all entries below are used by various CLI commands, please
|
||||
|
@ -57,7 +57,7 @@ struct comp_ctx {
|
||||
int cur_lvl;
|
||||
};
|
||||
|
||||
/* Thanks to MSIE/IIS, the "deflate" name is ambigous, as according to the RFC
|
||||
/* Thanks to MSIE/IIS, the "deflate" name is ambiguous, as according to the RFC
|
||||
* it's a zlib-wrapped deflate stream, but MSIE only understands a raw deflate
|
||||
* stream. For this reason some people prefer to emit a raw deflate stream on
|
||||
* "deflate" and we'll need two algos for the same name, they are distinguished
|
||||
|
@ -46,7 +46,7 @@ extern struct pool_head *dns_requester_pool;
|
||||
#define DNS_MAX_NAME_SIZE 255
|
||||
#define DNS_MAX_UDP_MESSAGE 8192
|
||||
|
||||
/* DNS minimun record size: 1 char + 1 NULL + type + class */
|
||||
/* DNS minimum record size: 1 char + 1 NULL + type + class */
|
||||
#define DNS_MIN_RECORD_SIZE (1 + 1 + 2 + 2)
|
||||
|
||||
/* DNS smallest fqdn 'a.gl' size */
|
||||
@ -151,7 +151,7 @@ struct dns_answer_item {
|
||||
struct sockaddr address; /* IPv4 or IPv6, network format */
|
||||
char target[DNS_MAX_NAME_SIZE+1]; /* Response data: SRV or CNAME type target */
|
||||
time_t last_seen; /* When was the answer was last seen */
|
||||
struct dns_answer_item *ar_item; /* pointer to a RRset from the additionnal section, if exists */
|
||||
struct dns_answer_item *ar_item; /* pointer to a RRset from the additional section, if exists */
|
||||
struct list list;
|
||||
};
|
||||
|
||||
|
@ -124,7 +124,7 @@ struct hlua_appctx {
|
||||
struct hlua_txn htxn;
|
||||
};
|
||||
|
||||
/* This struc is used with sample fetches and sample converters. */
|
||||
/* This struct is used with sample fetches and sample converters. */
|
||||
struct hlua_smp {
|
||||
struct stream *s;
|
||||
struct proxy *p;
|
||||
|
@ -28,7 +28,7 @@
|
||||
struct map_descriptor {
|
||||
struct sample_conv *conv; /* original converter descriptor */
|
||||
struct pattern_head pat; /* the pattern matching associated to the map */
|
||||
int do_free; /* set if <pat> is the orignal pat and must be freed */
|
||||
int do_free; /* set if <pat> is the original pat and must be freed */
|
||||
};
|
||||
|
||||
#endif /* _TYPES_MAP_H */
|
||||
|
@ -222,7 +222,7 @@ struct server {
|
||||
|
||||
struct eb_root pendconns; /* pending connections */
|
||||
struct list actconns; /* active connections */
|
||||
struct mt_list *idle_conns; /* sharable idle connections*/
|
||||
struct mt_list *idle_conns; /* shareable idle connections*/
|
||||
struct mt_list *safe_conns; /* safe idle connections */
|
||||
struct list *available_conns; /* Connection in used, but with still new streams available */
|
||||
unsigned int pool_purge_delay; /* Delay before starting to purge the idle conns pool */
|
||||
@ -231,7 +231,7 @@ struct server {
|
||||
unsigned int curr_idle_nb; /* Current number of connections in the idle list */
|
||||
unsigned int curr_safe_nb; /* Current number of connections in the safe list */
|
||||
unsigned int curr_used_conns; /* Current number of used connections */
|
||||
unsigned int max_used_conns; /* Max number of used connections (the counter is resetted at each connection purges */
|
||||
unsigned int max_used_conns; /* Max number of used connections (the counter is reset at each connection purges */
|
||||
unsigned int *curr_idle_thr; /* Current number of orphan idling connections per thread */
|
||||
int max_reuse; /* Max number of requests on a same connection */
|
||||
struct eb32_node idle_node; /* When to next do cleanup in the idle connections */
|
||||
|
@ -132,7 +132,7 @@ enum spoe_context_error {
|
||||
SPOE_CTX_ERRS,
|
||||
};
|
||||
|
||||
/* Errors triggerd by SPOE applet */
|
||||
/* Errors triggered by SPOE applet */
|
||||
enum spoe_frame_error {
|
||||
SPOE_FRM_ERR_NONE = 0,
|
||||
SPOE_FRM_ERR_IO,
|
||||
@ -269,7 +269,7 @@ struct spoe_agent {
|
||||
struct freq_ctr processing_per_sec;
|
||||
|
||||
struct freq_ctr conn_per_sec; /* connections per second */
|
||||
struct freq_ctr err_per_sec; /* connetion errors per second */
|
||||
struct freq_ctr err_per_sec; /* connection errors per second */
|
||||
|
||||
struct eb_root idle_applets; /* idle SPOE applets available to process data */
|
||||
struct list applets; /* all SPOE applets for this agent */
|
||||
@ -307,7 +307,7 @@ struct spoe_context {
|
||||
struct list *groups; /* List of available SPOE group */
|
||||
|
||||
struct buffer buffer; /* Buffer used to store a encoded messages */
|
||||
struct buffer_wait buffer_wait; /* position in the list of ressources waiting for a buffer */
|
||||
struct buffer_wait buffer_wait; /* position in the list of resources waiting for a buffer */
|
||||
struct list list;
|
||||
|
||||
enum spoe_ctx_state state; /* SPOE_CTX_ST_* */
|
||||
@ -359,7 +359,7 @@ struct spoe_appctx {
|
||||
#endif
|
||||
|
||||
struct buffer buffer; /* Buffer used to store a encoded messages */
|
||||
struct buffer_wait buffer_wait; /* position in the list of ressources waiting for a buffer */
|
||||
struct buffer_wait buffer_wait; /* position in the list of resources waiting for a buffer */
|
||||
struct list waiting_queue; /* list of streams waiting for a ACK frame, in sync and pipelining mode */
|
||||
struct list list; /* next spoe appctx for the same agent */
|
||||
struct eb32_node node; /* node used for applets tree */
|
||||
|
@ -3266,7 +3266,7 @@ const char *init_check(struct check *check, int type)
|
||||
|
||||
check->wait_list.tasklet = tasklet_new();
|
||||
if (!check->wait_list.tasklet)
|
||||
return "out of memroy while allocating check tasklet";
|
||||
return "out of memory while allocating check tasklet";
|
||||
check->wait_list.events = 0;
|
||||
check->wait_list.tasklet->process = event_srv_chk_io;
|
||||
check->wait_list.tasklet->context = check;
|
||||
|
@ -1770,11 +1770,11 @@ static int _getsocks(char **args, char *payload, struct appctx *appctx, void *pr
|
||||
* Listener options, as an int.
|
||||
*/
|
||||
/* We will send sockets MAX_SEND_FD per MAX_SEND_FD, allocate a
|
||||
* buffer big enough to store the socket informations.
|
||||
* buffer big enough to store the socket information.
|
||||
*/
|
||||
tmpbuf = malloc(MAX_SEND_FD * (1 + MAXPATHLEN + 1 + IFNAMSIZ + sizeof(int)));
|
||||
if (tmpbuf == NULL) {
|
||||
ha_warning("Failed to allocate memory to transfer socket informations\n");
|
||||
ha_warning("Failed to allocate memory to transfer socket information\n");
|
||||
goto out;
|
||||
}
|
||||
iov.iov_base = tmpbuf;
|
||||
@ -2391,7 +2391,7 @@ int pcli_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
|
||||
|
||||
/* We must trim any excess data from the response buffer, because we
|
||||
* may have blocked an invalid response from a server that we don't
|
||||
* want to accidently forward once we disable the analysers, nor do
|
||||
* want to accidentally forward once we disable the analysers, nor do
|
||||
* we want those data to come along with next response. A typical
|
||||
* example of such data would be from a buggy server responding to
|
||||
* a HEAD with some data, or sending more than the advertised
|
||||
|
32
src/hlua.c
32
src/hlua.c
@ -405,8 +405,8 @@ static int hlua_arg2lua(lua_State *L, const struct arg *arg)
|
||||
|
||||
/* This function take one entrie 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 gived to the
|
||||
* lua wrapper and converted as arg list by thi function.
|
||||
* with sample fetch wrappers. The input arguments are given to the
|
||||
* lua wrapper and converted as arg list by the function.
|
||||
*/
|
||||
static int hlua_lua2arg(lua_State *L, int ud, struct arg *arg)
|
||||
{
|
||||
@ -441,7 +441,7 @@ static int hlua_lua2arg(lua_State *L, int ud, struct arg *arg)
|
||||
|
||||
/* the following functions are used to convert a struct sample
|
||||
* in Lua type. This useful to convert the return of the
|
||||
* fetchs or converters.
|
||||
* fetches or converters.
|
||||
*/
|
||||
static int hlua_smp2lua(lua_State *L, struct sample *smp)
|
||||
{
|
||||
@ -493,7 +493,7 @@ static int hlua_smp2lua(lua_State *L, struct sample *smp)
|
||||
|
||||
/* the following functions are used to convert a struct sample
|
||||
* in Lua strings. This is useful to convert the return of the
|
||||
* fetchs or converters.
|
||||
* fetches or converters.
|
||||
*/
|
||||
static int hlua_smp2lua_str(lua_State *L, struct sample *smp)
|
||||
{
|
||||
@ -584,7 +584,7 @@ static int hlua_lua2smp(lua_State *L, int ud, struct sample *smp)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* This function check the "argp" builded by another conversion function
|
||||
/* This function check the "argp" built by another conversion function
|
||||
* 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.
|
||||
*
|
||||
@ -2696,7 +2696,7 @@ static int hlua_channel_new(lua_State *L, struct channel *channel)
|
||||
* in a string LUA variables. Returns -1 and push a nil value in
|
||||
* the stack if the channel is closed and all the data are consumed,
|
||||
* returns 0 if no data are available, otherwise it returns the length
|
||||
* of the builded string.
|
||||
* of the built string.
|
||||
*/
|
||||
static inline int _hlua_channel_dup(struct channel *chn, lua_State *L)
|
||||
{
|
||||
@ -7456,7 +7456,7 @@ static int hlua_cli_parse_fct(char **args, char *payload, struct appctx *appctx,
|
||||
appctx->ctx.hlua_cli.hlua = hlua;
|
||||
|
||||
/* Create task used by signal to wakeup applets.
|
||||
* We use the same wakeup fonction than the Lua applet_tcp and
|
||||
* We use the same wakeup function than the Lua applet_tcp and
|
||||
* applet_http. It is absolutely compatible.
|
||||
*/
|
||||
appctx->ctx.hlua_cli.task = task_new(tid_bit);
|
||||
@ -7816,7 +7816,7 @@ static int hlua_load(char **args, int section_type, struct proxy *curpx,
|
||||
lua_pop(gL.T, 1);
|
||||
return -1;
|
||||
default:
|
||||
memprintf(err, "Lua unknonwn error: %s\n", lua_tostring(gL.T, -1));
|
||||
memprintf(err, "Lua unknown error: %s\n", lua_tostring(gL.T, -1));
|
||||
lua_pop(gL.T, 1);
|
||||
return -1;
|
||||
}
|
||||
@ -8124,7 +8124,7 @@ void hlua_init(void)
|
||||
/* Create and fill the metatable. */
|
||||
lua_newtable(gL.T);
|
||||
|
||||
/* Create and fille the __index entry. */
|
||||
/* Create and fill the __index entry. */
|
||||
lua_pushstring(gL.T, "__index");
|
||||
lua_newtable(gL.T);
|
||||
|
||||
@ -8156,7 +8156,7 @@ void hlua_init(void)
|
||||
/* Create and fill the metatable. */
|
||||
lua_newtable(gL.T);
|
||||
|
||||
/* Create and fille the __index entry. */
|
||||
/* Create and fill the __index entry. */
|
||||
lua_pushstring(gL.T, "__index");
|
||||
lua_newtable(gL.T);
|
||||
|
||||
@ -8187,7 +8187,7 @@ void hlua_init(void)
|
||||
/* Create and fill the metatable. */
|
||||
lua_newtable(gL.T);
|
||||
|
||||
/* Create and fille the __index entry. */
|
||||
/* Create and fill the __index entry. */
|
||||
lua_pushstring(gL.T, "__index");
|
||||
lua_newtable(gL.T);
|
||||
|
||||
@ -8280,7 +8280,7 @@ void hlua_init(void)
|
||||
/* Create and fill the metatable. */
|
||||
lua_newtable(gL.T);
|
||||
|
||||
/* Create and fille the __index entry. */
|
||||
/* Create and fill the __index entry. */
|
||||
lua_pushstring(gL.T, "__index");
|
||||
lua_newtable(gL.T);
|
||||
|
||||
@ -8318,7 +8318,7 @@ void hlua_init(void)
|
||||
/* Create and fill the metatable. */
|
||||
lua_newtable(gL.T);
|
||||
|
||||
/* Create and fille the __index entry. */
|
||||
/* Create and fill the __index entry. */
|
||||
lua_pushstring(gL.T, "__index");
|
||||
lua_newtable(gL.T);
|
||||
|
||||
@ -8346,7 +8346,7 @@ void hlua_init(void)
|
||||
/* Create and fill the metatable. */
|
||||
lua_newtable(gL.T);
|
||||
|
||||
/* Create and fille the __index entry. */
|
||||
/* Create and fill the __index entry. */
|
||||
lua_pushstring(gL.T, "__index");
|
||||
lua_newtable(gL.T);
|
||||
|
||||
@ -8377,7 +8377,7 @@ void hlua_init(void)
|
||||
/* Create and fill the metatable. */
|
||||
lua_newtable(gL.T);
|
||||
|
||||
/* Create and fille the __index entry. */
|
||||
/* Create and fill the __index entry. */
|
||||
lua_pushstring(gL.T, "__index");
|
||||
lua_newtable(gL.T);
|
||||
|
||||
@ -8431,7 +8431,7 @@ void hlua_init(void)
|
||||
/* Create and fill the metatable. */
|
||||
lua_newtable(gL.T);
|
||||
|
||||
/* Create and fille the __index entry. */
|
||||
/* Create and fill the __index entry. */
|
||||
lua_pushstring(gL.T, "__index");
|
||||
lua_newtable(gL.T);
|
||||
|
||||
|
@ -992,7 +992,7 @@ struct buffer *http_load_errorfile(const char *file, char **errmsg)
|
||||
return buf;
|
||||
}
|
||||
|
||||
/* Convert the raw http message <msg> into an HTX message. On sucess, the HTX
|
||||
/* Convert the raw http message <msg> into an HTX message. On success, the HTX
|
||||
* message is returned. On error, NULL is returned and an error message is
|
||||
* written into the <errmsg> buffer.
|
||||
*/
|
||||
@ -1974,7 +1974,7 @@ int val_blk_arg(struct arg *arg, char **err_msg)
|
||||
|
||||
|
||||
/* Note: must not be declared <const> as its list will be overwritten.
|
||||
* Note: htx sample fetches should only used for developpement purpose.
|
||||
* Note: htx sample fetches should only used for development purpose.
|
||||
*/
|
||||
static struct sample_fetch_kw_list sample_fetch_keywords = {ILH, {
|
||||
{ "internal.strm.is_htx", smp_fetch_is_htx, 0, NULL, SMP_T_BOOL, SMP_USE_L6REQ },
|
||||
|
@ -703,7 +703,7 @@ int stktable_parse_type(char **args, int *myidx, unsigned long *type, size_t *ke
|
||||
* <nid> is the stick-table name which is sent over the network. It must be equal
|
||||
* to <id> if this stick-table is parsed from a proxy section, and prefixed by <peers>
|
||||
* "peers" section name followed by a '/' character if parsed from a "peers" section.
|
||||
* This is the responsability of the caller to check this.
|
||||
* This is the responsibility of the caller to check this.
|
||||
* Return an error status with ERR_* flags set if required, 0 if no error was encountered.
|
||||
*/
|
||||
int parse_stick_table(const char *file, int linenum, char **args,
|
||||
|
@ -20,7 +20,7 @@ frontend 1
|
||||
# missing closing ')' after arguments to fetch keyword 'req.hdr' in ACL expression 'req.hdr('.
|
||||
block if { req.hdr( }
|
||||
|
||||
# cannot be triggerred : "returns type of fetch method '%s' is unknown"
|
||||
# cannot be triggered : "returns type of fetch method '%s' is unknown"
|
||||
|
||||
# fetch method 'always_true' : no argument supported, but got 'arg' in ACL expression 'always_true(arg)'.
|
||||
block if { always_true(arg) }
|
||||
|
@ -20,7 +20,7 @@ frontend 1
|
||||
# missing closing ')' after arguments to fetch keyword 'req.hdr'
|
||||
http-request add-header name %[req.hdr(]
|
||||
|
||||
# cannot be triggerred : "returns type of fetch method '%s' is unknown"
|
||||
# cannot be triggered : "returns type of fetch method '%s' is unknown"
|
||||
|
||||
# fetch method 'always_true' : no argument supported, but got 'arg'
|
||||
http-request add-header name %[always_true(arg)]
|
||||
|
Loading…
Reference in New Issue
Block a user