From d251ec90ee9567cf121f4179f3387c00e859a226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Sun, 2 Apr 2023 15:24:08 +0200 Subject: [PATCH] ctl: typos --- src/modules/ctl/binrpc.h | 8 ++++---- src/modules/ctl/binrpc_run.c | 10 +++++----- src/modules/ctl/ctl.cfg | 2 +- src/modules/ctl/fifo_server.c | 6 +++--- src/modules/ctl/io_listener.c | 10 +++++----- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/modules/ctl/binrpc.h b/src/modules/ctl/binrpc.h index 7d77ce6568f..c3b8c4811e6 100644 --- a/src/modules/ctl/binrpc.h +++ b/src/modules/ctl/binrpc.h @@ -31,14 +31,14 @@ * represented) * CL = cookie length -1 (number of bytes on which the cookie is represented) * E.g.: LL= 0 => total_len is represented on 1 byte (LL+1) - * CL= 3 => cookie is represneted on 4 bytes (CL+1) + * CL= 3 => cookie is represented on 4 bytes (CL+1) */ /* record format: * 1b 3b 4b * |S | size | type || ... || ... || * * if S==0, size is the size (in bytes) of the value (if size==0 => null value) - * if S==1, optional_value_len is present, and size is it's size + * if S==1, optional_value_len is present, and size is its size * (if size==0 => and type==array or struct => marks end, else * error, reserved) * Examples: @@ -344,7 +344,7 @@ inline static int binrpc_build_hdr( int type, int body_len, -/* changes the length of a header (enough space must be availale) */ +/* changes the length of a header (enough space must be available) */ inline static int binrpc_hdr_change_len(unsigned char* hdr, int hdr_len, int new_len) { @@ -417,7 +417,7 @@ inline static int binrpc_add_skip(struct binrpc_pkt* pkt, int bytes) * adds only the string mark and len, you'll have to memcpy the contents * manually later (and also use binrpc_add_skip(pkt, l) or increase * pkt->crt directly if you want to continue adding to this pkt). - * Usefull for optimizing str writing (e.g. writev(iovec)) + * Useful for optimizing str writing (e.g. writev(iovec)) * WARNING: use with care, low level function, binrpc_addstr or * binrpc_add_str_type are probably what you want. * WARNING1: BINRPC_T_STR and BINRPC_T_AVP must be 0 term, the len passed to diff --git a/src/modules/ctl/binrpc_run.c b/src/modules/ctl/binrpc_run.c index 41c501320d4..3265a63c2ab 100644 --- a/src/modules/ctl/binrpc_run.c +++ b/src/modules/ctl/binrpc_run.c @@ -420,7 +420,7 @@ static void _rpc_fault(struct binrpc_ctx* ctx, int code, if (ctx->replied){ LOG(L_ERR, "ERROR: binrpc: rpc_send: rpc method %s tried to reply" - " more then once\n", ctx->method?ctx->method:""); + " more than once\n", ctx->method?ctx->method:""); return; } err=0; @@ -483,7 +483,7 @@ static void rpc_fault(struct binrpc_ctx* ctx, int code, char* fmt, ...) if (ctx->replied){ LOG(L_ERR, "ERROR: binrpc: rpc_send: rpc method %s tried to reply" - " more then once\n", ctx->method?ctx->method:""); + " more than once\n", ctx->method?ctx->method:""); return; } va_start(ap, fmt); @@ -505,7 +505,7 @@ static int rpc_fault_prepare(struct binrpc_ctx* ctx, int code, char* fmt, ...) if (ctx->replied){ LOG(L_ERR, "ERROR: binrpc: rpc_send: rpc method %s tried to reply" - " more then once\n", ctx->method?ctx->method:""); + " more than once\n", ctx->method?ctx->method:""); return -1; } va_start(ap, fmt); @@ -576,7 +576,7 @@ static int rpc_send(struct binrpc_ctx* ctx) if (ctx->replied){ LOG(L_ERR, "ERROR: binrpc: rpc_send: rpc method %s tried to reply" - " more then once\n", ctx->method?ctx->method:""); + " more than once\n", ctx->method?ctx->method:""); goto error; } b_len=body_get_len(&ctx->out.pkt, &ctx->out.structs); @@ -617,7 +617,7 @@ static int rpc_send(struct binrpc_ctx* ctx) * needed (after bytes_needed new bytes received this * function will be called again * reply, - buffer where the reply will be written - * reply_len - intially filled with the reply buffer len, + * reply_len - initially filled with the reply buffer len, * after the call will contain how much of that * buffer was really used * returns: number of bytes processed on success/partial success diff --git a/src/modules/ctl/ctl.cfg b/src/modules/ctl/ctl.cfg index 4966e7c4db2..7e4fe2e210e 100644 --- a/src/modules/ctl/ctl.cfg +++ b/src/modules/ctl/ctl.cfg @@ -44,7 +44,7 @@ modparam("ctl", "binrpc", "tcp:3012") # tcp any , port 3012 modparam("ctl", "binrpc", "udp:*:3012") # udp any , port 3012 # old fifo support -modparam("ctl", "fifo", "fifo:/tmp/ser_fifo") # clasic fifo +modparam("ctl", "fifo", "fifo:/tmp/ser_fifo") # classic fifo modparam("ctl", "fifo", "/tmp/ser_fifo2") modparam("ctl", "fifo", "udp:*:2050") # fifo protocol over udp modparam("ctl", "fifo", "tcp:*:2050") # fifo over tcp diff --git a/src/modules/ctl/fifo_server.c b/src/modules/ctl/fifo_server.c index 584ec624f49..0d9e7bcbe03 100644 --- a/src/modules/ctl/fifo_server.c +++ b/src/modules/ctl/fifo_server.c @@ -110,7 +110,7 @@ struct readline_handle{ enum text_flags { CHUNK_SEEN = (1 << 0), - CHUNK_POSITIONAL = (1 << 1), /* Positinal parameter, should be followed by \n */ + CHUNK_POSITIONAL = (1 << 1), /* Positional parameter, should be followed by \n */ CHUNK_MEMBER_NAME = (1 << 2), /* Struct member name, should be followed by : */ CHUNK_MEMBER_VALUE = (1 << 3) /* Struct member value, should be followed by , if * there is another member name and \n if not */ @@ -178,7 +178,7 @@ static int rpc_send (rpc_ctx_t* ctx); / static void rpc_fault (rpc_ctx_t* ctx, int code, char* fmt, ...); /* Signal a failure to the client */ static int rpc_add (rpc_ctx_t* ctx, char* fmt, ...); /* Add a new piece of data to the result */ static int rpc_scan (rpc_ctx_t* ctx, char* fmt, ...); /* Retrieve request parameters */ -static int rpc_rpl_printf (rpc_ctx_t* ctx, char* fmt, ...); /* Add printf-like formated data to the result set */ +static int rpc_rpl_printf (rpc_ctx_t* ctx, char* fmt, ...); /* Add printf-like formatted data to the result set */ static int rpc_struct_add (struct text_chunk* s, char* fmt, ...); /* Create a new structure */ static int rpc_struct_scan (struct rpc_struct* s, char* fmt, ...); /* Scan attributes of a structure */ static int rpc_struct_printf(struct text_chunk* s, char* name, char* fmt, ...); @@ -457,7 +457,7 @@ static struct rpc_struct* new_struct(rpc_ctx_t* ctx, str* line) /* Create value chunk */ v = new_chunk_unescape(&value); if (!v) { - rpc_fault(ctx, 400, "Error while processing struct membeer '%.*s'" + rpc_fault(ctx, 400, "Error while processing struct member '%.*s'" " on line %d", name.len, ZSW(name.s), ctx->line_no); goto err; } diff --git a/src/modules/ctl/io_listener.c b/src/modules/ctl/io_listener.c index 64f74a80d03..5de2e9cb05f 100644 --- a/src/modules/ctl/io_listener.c +++ b/src/modules/ctl/io_listener.c @@ -323,7 +323,7 @@ void io_listen_loop(int fd_no, struct ctrl_socket* cs_lst) * from this fd (e.g.: we are closing it ) * 0 on EAGAIN or when by some other way it is known that no more * io events are queued on the fd (the receive buffer is empty). - * Usefull to detect when there are no more io events queued for + * Useful to detect when there are no more io events queued for * sigio_rt, epoll_et, kqueue. * >0 on successfull read from the fd (when there might be more io * queued -- the receive buffer might still be non-empty) @@ -382,7 +382,7 @@ static int handle_ctrl_dgram(struct ctrl_socket* cs) * from this fd (e.g.: we are closing it ) * 0 on EAGAIN or when by some other way it is known that no more * io events are queued on the fd (the receive buffer is empty). - * Usefull to detect when there are no more io events queued for + * Useful to detect when there are no more io events queued for * sigio_rt, epoll_et, kqueue. * >0 on successfull accept from the fd (when there might be more io * queued -- the receive buffer might still be non-empty) @@ -458,7 +458,7 @@ static int handle_new_connect(struct ctrl_socket* cs) * from this fd (e.g.: we are closing it ) * 0 on EAGAIN or when by some other way it is known that no more * io events are queued on the fd (the receive buffer is empty). - * Usefull to detect when there are no more io events queued for + * Useful to detect when there are no more io events queued for * sigio_rt, epoll_et, kqueue. * >0 on successfull read from the fd (when there might be more io * queued -- the receive buffer might still be non-empty) @@ -572,7 +572,7 @@ static int handle_stream_read(struct stream_connection* s_c, int idx) * from this fd (e.g.: we are closing it ) * 0 on EAGAIN or when by some other way it is known that no more * io events are queued on the fd (the receive buffer is empty). - * Usefull to detect when there are no more io events queued for + * Useful to detect when there are no more io events queued for * sigio_rt, epoll_et, kqueue. * >0 on successfull read from the fd (when there might be more io * queued -- the receive buffer might still be non-empty) @@ -685,7 +685,7 @@ static int handle_fifo_read(struct ctrl_socket* cs, int idx) * return: -1 on error * 0 on EAGAIN or when by some other way it is known that no more * io events are queued on the fd (the receive buffer is empty). - * Usefull to detect when there are no more io events queued for + * Useful to detect when there are no more io events queued for * sigio_rt, epoll_et, kqueue. * >0 on successfull read from the fd (when there might be more io * queued -- the receive buffer might still be non-empty)