]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: assorted typo fixes in the code and comments
authorIlya Shipitsin <chipitsine@gmail.com>
Mon, 23 Mar 2020 17:28:40 +0000 (22:28 +0500)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Mar 2020 15:09:35 +0000 (17:09 +0200)
This is fifth iteration of typo fixes

17 files changed:
contrib/deviceatlas/dac.h
contrib/mod_defender/spoa.c
contrib/modsecurity/modsec_wrapper.c
contrib/modsecurity/spoa.c
contrib/plug_qdisc/plug_qdisc.c
contrib/prometheus-exporter/service-prometheus.c
contrib/spoa_example/include/spoe_types.h
contrib/spoa_example/spoa.c
contrib/spoa_server/ps_lua.c
contrib/spoa_server/ps_python.c
contrib/spoa_server/spoa.c
contrib/wireshark-dissectors/peers/packet-happp.c
contrib/wurfl/wurfl/wurfl.h
src/connection.c
src/ev_evports.c
src/hlua_fcn.c
src/raw_sock.c

index 4e0189a71d224aa154851da482117897e0c3a3cc..92a9396c0ede25746ef33f20ce9a6f6663ae78f9 100644 (file)
@@ -70,7 +70,7 @@ enum da_status {
 enum da_severity {
     DA_SEV_FATAL, /* The operation will not continue, and the operation will return an error. */
     DA_SEV_ERROR, /* An error occurred, but the API call will return at least some valid information */
-    DA_SEV_WARN,  /* An unexpected event occured, but the system dealt with it */
+    DA_SEV_WARN,  /* An unexpected event occurred, but the system dealt with it */
     DA_SEV_INFO   /* An informational message. */
 };
 /* Forward references to tagged types */
index 94e6d6bda08e6bdf8fcb7bb0096fcb79f5eb7a5d..079e880cb091d5784093a1a14bc06ac1459c34e1 100644 (file)
@@ -192,7 +192,7 @@ check_proto_version(struct spoe_frame *frame, char **buf, char *end)
        DEBUG(frame->worker, "<%lu> Supported versions : %.*s",
              frame->client->id, (int)sz, str);
 
-       /* TODO: Find the right verion in supported ones */
+       /* TODO: Find the right version in supported ones */
 
        ret  = (p - *buf);
        *buf = p;
index a3a25414fcaff46c5948678b88a71940b9cc9204..7ae831e5c2728bdefc93cc77c5fce87c24921a45 100644 (file)
@@ -140,7 +140,7 @@ int modsecurity_load(const char *file)
 
        modsec_server = modsecInit();
        if (modsec_server == NULL) {
-               LOG(&null_worker, "ModSecurity initilisation failed.\n");
+               LOG(&null_worker, "ModSecurity initialisation failed.\n");
                return -1;
        }
 
@@ -153,7 +153,7 @@ int modsecurity_load(const char *file)
 
        modsec_config = modsecGetDefaultConfig();
        if (modsec_config == NULL) {
-               LOG(&null_worker, "ModSecurity default configuration initilisation failed.\n");
+               LOG(&null_worker, "ModSecurity default configuration initialisation failed.\n");
                return -1;
        }
 
index 225db29f8f568e4020c189bbc1c4adf0ad92e359..20916fdf3c4f3212a8470d55885e5180f6eea4d3 100644 (file)
@@ -197,7 +197,7 @@ check_proto_version(struct spoe_frame *frame, char **buf, char *end)
        DEBUG(frame->worker, "<%lu> Supported versions : %.*s",
              frame->client->id, (int)sz, str);
 
-       /* TODO: Find the right verion in supported ones */
+       /* TODO: Find the right version in supported ones */
 
        ret  = (p - *buf);
        *buf = p;
index 606a834c31df758b180d71d81623a783263eebd0..bc47f5d1e1481326234e8b4c1c1142e07b94cda5 100644 (file)
@@ -10,7 +10,7 @@
  * XXX Please, first note that this code is not safe. XXX
  * It was developed fast so that to reproduce a bug.
  * You will certainly have to adapt it to your application.
- * But at least it gives an idea about how to programatically use plug
+ * But at least it gives an idea about how to programmatically use plug
  * queueing disciplines.
  */
 
index 6e7eca04bd25b7b9348ac575d898bdf42e91a70b..8ffeb82033a92293632a7a570f2f8918d2f06f64 100644 (file)
@@ -73,7 +73,7 @@ enum {
 #define PROMEX_FL_SCOPE_ALL (PROMEX_FL_SCOPE_GLOBAL|PROMEX_FL_SCOPE_FRONT|PROMEX_FL_SCOPE_BACK|PROMEX_FL_SCOPE_SERVER)
 
 /* The max length for metrics name. It is a hard limit but it should be
- * enougth.
+ * enough.
  */
 #define PROMEX_MAX_NAME_LEN 128
 
@@ -615,7 +615,7 @@ const struct ist promex_st_metric_names[ST_F_TOTAL_FIELDS] = {
 const struct ist promex_inf_metric_desc[INF_TOTAL_FIELDS] = {
        [INF_NAME]                           = IST("Product name."),
        [INF_VERSION]                        = IST("HAProxy version."),
-       [INF_RELEASE_DATE]                   = IST("HAProxy realease date."),
+       [INF_RELEASE_DATE]                   = IST("HAProxy release date."),
        [INF_NBTHREAD]                       = IST("Configured number of threads."),
        [INF_NBPROC]                         = IST("Configured number of processes."),
        [INF_PROCESS_NUM]                    = IST("Relative process id, starting at 1."),
@@ -627,7 +627,7 @@ const struct ist promex_inf_metric_desc[INF_TOTAL_FIELDS] = {
        [INF_POOL_USED_MB]                   = IST("Total amount of memory used in pools (in bytes)."),
        [INF_POOL_FAILED]                    = IST("Total number of failed pool allocations."),
        [INF_ULIMIT_N]                       = IST("Maximum number of open file descriptors; 0=unset."),
-       [INF_MAXSOCK]                        = IST("Maximum numer of open sockets."),
+       [INF_MAXSOCK]                        = IST("Maximum number of open sockets."),
        [INF_MAXCONN]                        = IST("Maximum number of concurrent connections."),
        [INF_HARD_MAXCONN]                   = IST("Initial Maximum number of concurrent connections."),
        [INF_CURR_CONN]                      = IST("Number of active sessions."),
@@ -1140,7 +1140,7 @@ static int promex_metric_to_str(struct buffer *out, struct field *f, size_t max)
 /* Concatenate the <prefix> with the field name using the array
  * <promex_st_metric_names> and store it in <name>. The field type is in
  * <appctx->st2>. This function never fails but relies on
- * <PROMEX_MAX_NAME_LEN>. So by sure the result is small enougth to be copied in
+ * <PROMEX_MAX_NAME_LEN>. So by sure the result is small enough to be copied in
  * <name>
  */
 static void promex_metric_name(struct appctx *appctx, struct ist *name, const struct ist prefix)
@@ -1252,7 +1252,7 @@ static int promex_dump_metric(struct appctx *appctx, struct htx *htx,
 }
 
 
-/* Dump global metrics (prefixed by "haproxy_process_"). It returns 1 on sucess,
+/* Dump global metrics (prefixed by "haproxy_process_"). It returns 1 on success,
  * 0 if <htx> is full and -1 in case of any error. */
 static int promex_dump_global_metrics(struct appctx *appctx, struct htx *htx)
 {
@@ -1465,7 +1465,7 @@ static int promex_dump_global_metrics(struct appctx *appctx, struct htx *htx)
        goto end;
 }
 
-/* Dump frontends metrics (prefixed by "haproxy_frontend_"). It returns 1 on sucess,
+/* Dump frontends metrics (prefixed by "haproxy_frontend_"). It returns 1 on success,
  * 0 if <htx> is full and -1 in case of any error. */
 static int promex_dump_front_metrics(struct appctx *appctx, struct htx *htx)
 {
@@ -1648,7 +1648,7 @@ static int promex_dump_front_metrics(struct appctx *appctx, struct htx *htx)
        goto end;
 }
 
-/* Dump backends metrics (prefixed by "haproxy_backend_"). It returns 1 on sucess,
+/* Dump backends metrics (prefixed by "haproxy_backend_"). It returns 1 on success,
  * 0 if <htx> is full and -1 in case of any error. */
 static int promex_dump_back_metrics(struct appctx *appctx, struct htx *htx)
 {
@@ -1892,7 +1892,7 @@ static int promex_dump_back_metrics(struct appctx *appctx, struct htx *htx)
        goto end;
 }
 
-/* Dump servers metrics (prefixed by "haproxy_server_"). It returns 1 on sucess,
+/* Dump servers metrics (prefixed by "haproxy_server_"). It returns 1 on success,
  * 0 if <htx> is full and -1 in case of any error. */
 static int promex_dump_srv_metrics(struct appctx *appctx, struct htx *htx)
 {
@@ -2243,7 +2243,7 @@ static int promex_dump_metrics(struct appctx *appctx, struct stream_interface *s
        return -1;
 }
 
-/* Parse the query stirng of request URI to filter the metrics. It returns 1 on
+/* Parse the query string of request URI to filter the metrics. It returns 1 on
  * success and -1 on error. */
 static int promex_parse_uri(struct appctx *appctx, struct stream_interface *si)
 {
@@ -2401,7 +2401,7 @@ static void promex_appctx_handle_io(struct appctx *appctx)
        if (unlikely(si->state == SI_ST_DIS || si->state == SI_ST_CLO))
                goto out;
 
-       /* Check if the input buffer is avalaible. */
+       /* Check if the input buffer is available. */
        if (!b_size(&res->buf)) {
                si_rx_room_blk(si);
                goto out;
index 8f93edd212a480fafcb77c023ab08702acbbfcc1..a986227cbee84e91354a36696ab2a80a7ffb7e39 100644 (file)
@@ -100,7 +100,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,
index f32ac449a1e9c7079642c02c825e40bf2025b140..dd4a87338ba8edd44bbea0b7d892482b379889e4 100644 (file)
@@ -246,7 +246,7 @@ check_proto_version(struct spoe_frame *frame, char **buf, char *end)
        DEBUG(frame->worker, "<%lu> Supported versions : %.*s",
              frame->client->id, (int)sz, str);
 
-       /* TODO: Find the right verion in supported ones */
+       /* TODO: Find the right version in supported ones */
 
        ret  = (p - *buf);
        *buf = p;
index e7de2d93adae6c5477c2c306baa98637395bfe89..2d37d9b1e8ed10acb8a2daef3386e9ae845ea989 100644 (file)
@@ -396,7 +396,7 @@ static int ps_lua_load_file(struct worker *w, const char *file)
                lua_pop(L, 1);
                return 0;
        default:
-               fprintf(stderr, "lua unknonwn error: %s\n", lua_tostring(L, 0));
+               fprintf(stderr, "lua unknown error: %s\n", lua_tostring(L, 0));
                lua_pop(L, 1);
                return 0;
        }
@@ -488,7 +488,7 @@ static int ps_lua_exec_message(struct worker *w, void *ref, int nargs, struct sp
                case LUA_ERRERR:
                        msg_fmt = msg_fmt ? msg_fmt : "Lua message handler error";
                default:
-                       msg_fmt = msg_fmt ? msg_fmt : "Lua unknonwn error";
+                       msg_fmt = msg_fmt ? msg_fmt : "Lua unknown error";
                        msg = lua_tostring(L, -1);
                        if (msg == NULL)
                                msg = "Unknown error";
index 0a9fbffc60791f7cecc27a962690c4f28712deea..2dbe5ee3861ad0716de4c8e6a7924f1dc4838e9f 100644 (file)
@@ -50,7 +50,7 @@ static PyObject *ps_python_register_message(PyObject *self, PyObject *args)
 
        if (!PyArg_ParseTuple(args, "sO!", &name, &PyFunction_Type, &ref))
                return NULL;
-       Py_XINCREF(ref); /* because the function is intenally refrenced */
+       Py_XINCREF(ref); /* because the function is internally referenced */
 
        ps_register_message(&ps_python_bindings, name, (void *)ref);
 
@@ -602,7 +602,7 @@ static int ps_python_exec_message(struct worker *w, void *ref, int nargs, struct
                }
        }
 
-       /* Dictionnary { args = <list-of-args> } for the function */
+       /* Dictionary { args = <list-of-args> } for the function */
 
        fkw = PyDict_New();
        if (fkw == NULL) {
index f36c3db903080b3d1bea402066373f9e1c203094..9a8ffd0a00367ac9d0f9f9af92d927fc419e51a2 100644 (file)
@@ -51,7 +51,7 @@ enum spoe_frame_type {
        SPOE_FRM_T_AGENT_ACK
 };
 
-/* Errors triggerd by SPOE applet */
+/* Errors triggered by SPOE applet */
 enum spoe_frame_error {
        SPOE_FRM_ERR_NONE = 0,
        SPOE_FRM_ERR_IO,
@@ -501,7 +501,7 @@ check_proto_version(struct worker *w, int idx)
                return -1;
        }
 
-       /* TODO: Find the right verion in supported ones */
+       /* TODO: Find the right version in supported ones */
 
        return idx;
 }
@@ -822,7 +822,7 @@ int set_var_bin(struct worker *w,
 }
 
 /* This function is a little bit ugly,
- * TODO: improve the response without copying the bufer
+ * TODO: improve the response without copying the buffer
  */
 static int commit_agentack(struct worker *w)
 {
@@ -872,7 +872,7 @@ handle_hanotify(struct worker *w)
        DEBUG("Notify frame received: stream-id=%u - frame-id=%u",
              w->stream_id, w->frame_id);
 
-       /* Prepara ack, if the processing fails tha ack will be cancelled */
+       /* Prepare ack, if the processing fails the ack will be cancelled */
        prepare_agentack(w);
 
        /* Loop on messages */
@@ -915,7 +915,7 @@ handle_hanotify(struct worker *w)
                        idx += i;
                }
 
-               /* Lookup for existsing bindings. If no existing message
+               /* Lookup for existing bindings. If no existing message
                 * where found, does nothing.
                 */
                for (msg = ps_messages; msg; msg = msg->next)
index 980e290c27b6e03cab1e89683a964f7bbc70acbf..33263b4187760073da563d6816ed12b8645de66a 100644 (file)
@@ -158,7 +158,7 @@ enum {
 };
 
 /* The types of data we can store in a stick table.
- * Same defintions as in HAProxy sources.
+ * Same definitions as in HAProxy sources.
  */
 enum {
        STKT_DT_SERVER_ID,      /* the server ID to use with this stream if > 0 */
index ca512daebd927edca98317a81de7f6f0f157951c..3b450fc0385e6e62d25916504d85ae62e2a2904f 100644 (file)
@@ -322,7 +322,7 @@ wurfl_error wurfl_updater_set_data_url(wurfl_handle hwurfl, const char *data_url
 wurfl_error wurfl_updater_set_data_frequency(wurfl_handle hwurfl, wurfl_updater_frequency freq);
 
 // Set updater timeouts.
-// There are two timeouts, both in miliseconds : connection timeout and operation timeout.
+// There are two timeouts, both in milliseconds : connection timeout and operation timeout.
 // The values are mapped to CURL --connect-timeout and --max-time parameters
 // (after millisecs-to-secs conversion). Note that CURL sub millisecond timeouts don't work for
 // lack of a way to specify decimal values for timeout to curl (using 0.05 for example fails to work
index 45d81d8ba02bbb2c58e11dc6b1ebea00d77b846b..5a2fd95bc2f7fe4e4e9557b6b3d9d1900fd0e7fd 100644 (file)
@@ -140,7 +140,7 @@ void conn_fd_handler(int fd)
 
  leave:
        /* If we don't yet have a mux, that means we were waiting for
-        * informations to create one, typically from the ALPN. If we're
+        * information to create one, typically from the ALPN. If we're
         * done with the handshake, attempt to create one.
         */
        if (unlikely(!conn->mux) && !(conn->flags & CO_FL_WAIT_XPRT))
@@ -1193,7 +1193,7 @@ int conn_recv_socks4_proxy_response(struct connection *conn)
         *      code with one of the following values:
         *      90: request granted
         *      91: request rejected or failed
-        *      92: request rejected becasue SOCKS server cannot connect to identd on the client
+        *      92: request rejected because SOCKS server cannot connect to identd on the client
         *      93: request rejected because the client program and identd report different user-ids
         *      The remaining fields are ignored.
         */
index 23591d229c11d5be3a8f4526631ca5b21594176a..3d0dd435b1dffcbd507d34abaf824cbbeb6c14ca 100644 (file)
@@ -249,7 +249,7 @@ static void _do_poll(struct poller *p, int exp, int wake)
                /*
                 * Call connection processing callbacks.  Note that it's
                 * possible for this processing to alter the required event
-                * port assocation; i.e., the "state" member of the "fdtab"
+                * port association; i.e., the "state" member of the "fdtab"
                 * entry.  If it changes, the fd will be placed on the updated
                 * list for processing the next time we are called.
                 */
index 29c0bf4071800068194d5ac21ef7c63abcd2c370..a9c7fe507fda3e404a3ce0770224a280118966f6 100644 (file)
@@ -123,7 +123,7 @@ int hlua_fcn_pushfield(lua_State *L, struct field *field)
                /* 64 bits case, S64 is always supported */
                lua_pushinteger(L, field->u.s64);
 #else
-               /* 64 bits case, S64 is supported beetween INT_MIN and INT_MAX */
+               /* 64 bits case, S64 is supported between INT_MIN and INT_MAX */
                if (field->u.s64 < INT_MIN || field->u.s64 > INT_MAX)
                        lua_pushnumber(L, (lua_Number)field->u.s64);
                else
@@ -214,7 +214,7 @@ int hlua_dump_object(struct lua_State *L)
 
 /* This function register a table as metatable and. It names
  * the metatable, and returns the associated reference.
- * The original table is poped from the top of the stack.
+ * The original table is popped from the top of the stack.
  * "name" is the referenced class name.
  */
 int hlua_register_metatable(struct lua_State *L, char *name)
@@ -235,7 +235,7 @@ int hlua_register_metatable(struct lua_State *L, char *name)
        lua_rawset(L, -3);
 
        /* Register a named entry for the table. The table
-        * reference is copyed first because the function
+        * reference is copied first because the function
         * lua_setfield() pop the entry.
         */
        lua_pushvalue(L, -1);
@@ -424,7 +424,7 @@ static int hlua_concat_dump(lua_State *L)
        buffer = lua_touserdata(L, -1);
        lua_pop(L, 1);
 
-       /* Push the soncatenated strng in the stack. */
+       /* Push the soncatenated string in the stack. */
        lua_pushlstring(L, buffer, b->len);
        return 1;
 }
@@ -1421,7 +1421,7 @@ int hlua_fcn_post_init(lua_State *L)
  * It tokenize the input string using the list of separators
  * as separator.
  *
- * The functionreturns a tablle filled with tokens.
+ * The functionreturns a table filled with tokens.
  */
 int hlua_tokenize(lua_State *L)
 {
index f17d45d78399f516b802b3cdc240f383e7de22af..340f92993a1b2258ca3bfaa57fe0834702b93e16 100644 (file)
@@ -113,7 +113,7 @@ int raw_sock_to_pipe(struct connection *conn, void *xprt_ctx, struct pipe *pipe,
                                 * empty the pipe.
                                 */
                                if (pipe->data) {
-                                       /* alway stop reading until the pipe is flushed */
+                                       /* always stop reading until the pipe is flushed */
                                        conn->flags |= CO_FL_WAIT_ROOM;
                                        break;
                                }