@cryptotaxi247 / netdata-1 / commits / 757ccb0ca

Spelling aclk (#10910)

Josh Soref committed Apr 14, 2021 at 05:30 UTC 757ccb0ca1215a06cbb34e751f6cf4003f9e74b6
9 files changed +23 -23
aclk/legacy/aclk_common.c
+4 -4
@@ -100,7 +100,7 @@ static inline void safe_log_proxy_error(char *str, const char *proxy)
100 freez(log);
101 }
102
103 -static inline int check_socks_enviroment(const char **proxy)
103 +static inline int check_socks_environment(const char **proxy)
104 {
105 char *tmp = getenv("socks_proxy");
106
@@ -118,7 +118,7 @@ static inline int check_socks_enviroment(const char **proxy)
118 return 1;
119 }
120
121 -static inline int check_http_enviroment(const char **proxy)
121 +static inline int check_http_environment(const char **proxy)
122 {
123 char *tmp = getenv("http_proxy");
124
@@ -145,7 +145,7 @@ const char *aclk_lws_wss_get_proxy_setting(ACLK_PROXY_TYPE *type)
145 return proxy;
146
147 if (strcmp(proxy, ACLK_PROXY_ENV) == 0) {
148 - if (check_socks_enviroment(&proxy) == 0) {
148 + if (check_socks_environment(&proxy) == 0) {
149 #ifdef LWS_WITH_SOCKS5
150 *type = PROXY_TYPE_SOCKS5;
151 return proxy;
@@ -156,7 +156,7 @@ const char *aclk_lws_wss_get_proxy_setting(ACLK_PROXY_TYPE *type)
156 proxy);
157 #endif
158 }
159 - if (check_http_enviroment(&proxy) == 0)
159 + if (check_http_environment(&proxy) == 0)
160 *type = PROXY_TYPE_HTTP;
161 return proxy;
162 }
aclk/legacy/aclk_lws_wss_client.c
+2 -2
@@ -428,7 +428,7 @@ static int aclk_lws_wss_callback(struct lws *wsi, enum lws_callback_reasons reas
428
429 // Callback servicing is forced when we are closed from above.
430 if (engine_instance->upstream_reconnect_request) {
431 - error("Closing lws connectino due to libmosquitto error.");
431 + error("Closing lws connection due to libmosquitto error.");
432 char *upstream_connection_error = "MQTT protocol error. Closing underlying wss connection.";
433 lws_close_reason(
434 wsi, LWS_CLOSE_STATUS_PROTOCOL_ERR, (unsigned char *)upstream_connection_error,
@@ -609,7 +609,7 @@ void aclk_lws_wss_service_loop()
609 // in case the MQTT connection disconnect while lws transport is still operational
610 // we should drop connection and reconnect
611 // this function should be called when that happens to notify lws of that situation
612 -void aclk_lws_wss_mqtt_layer_disconect_notif()
612 +void aclk_lws_wss_mqtt_layer_disconnect_notif()
613 {
614 if (!engine_instance)
615 return;
aclk/legacy/aclk_lws_wss_client.h
+3 -3
@@ -8,9 +8,9 @@
8 #include "libnetdata/libnetdata.h"
9
10 // This is as define because ideally the ACLK at high level
11 -// can do mosqitto writes and reads only from one thread
11 +// can do mosquitto writes and reads only from one thread
12 // which is cleaner implementation IMHO
13 -// in such case this mutexes are not necessarry and life
13 +// in such case this mutexes are not necessary and life
14 // is simpler
15 #define ACLK_LWS_MOSQUITTO_IO_CALLS_MULTITHREADED 1
16
@@ -78,7 +78,7 @@ int aclk_lws_wss_client_write(void *buf, size_t count);
78 int aclk_lws_wss_client_read(void *buf, size_t count);
79 void aclk_lws_wss_service_loop();
80
81 -void aclk_lws_wss_mqtt_layer_disconect_notif();
81 +void aclk_lws_wss_mqtt_layer_disconnect_notif();
82
83 // Notifications inside the layer above
84 void aclk_lws_connection_established();
aclk/legacy/aclk_query.c
+1 -1
@@ -498,7 +498,7 @@ static int aclk_execute_query_v2(struct aclk_query *this_query)
498 z_buffer->len += bytes_to_cpy;
499 } while(z_ret != Z_STREAM_END);
500 // so that web_client_build_http_header
501 - // puts correct content lenght into header
501 + // puts correct content length into header
502 buffer_free(w->response.data);
503 w->response.data = z_buffer;
504 z_buffer = NULL;
aclk/legacy/aclk_rx_msgs.c
+2 -2
@@ -218,7 +218,7 @@ static int aclk_handle_version_response(struct aclk_request *cloud_to_agent, cha
218
219 if (unlikely(cloud_to_agent->version != ACLK_VERSION_NEG_VERSION)) {
220 error(
221 - "Unsuported version of \"version\" message from cloud. Expected %d, Got %d",
221 + "Unsupported version of \"version\" message from cloud. Expected %d, Got %d",
222 ACLK_VERSION_NEG_VERSION,
223 cloud_to_agent->version);
224 return 1;
@@ -353,7 +353,7 @@ int aclk_handle_cloud_message(char *payload)
353 // see what `aclk_queue_query` parameter `internal` does
354
355 // NEVER CONTINUE THIS LOOP AFTER CALLING FUNCTION!!!
356 - // msg handlers (namely aclk_handle_version_responce)
356 + // msg handlers (namely aclk_handle_version_response)
357 // can freely change what aclk_incoming_msg_types points to
358 // so either exit or restart this for loop
359 freez(cloud_to_agent.type_id);
aclk/legacy/agent_cloud_link.c
+5 -5
@@ -653,7 +653,7 @@ static void aclk_graceful_disconnect()
653
654 aclk_shutting_down = 1;
655 _link_shutdown();
656 - aclk_lws_wss_mqtt_layer_disconect_notif();
656 + aclk_lws_wss_mqtt_layer_disconnect_notif();
657
658 write_q = 1;
659 event_loop_timeout = now_realtime_sec() + 5;
@@ -937,7 +937,7 @@ static void aclk_try_to_connect(char *hostname, int port)
937 {
938 int rc;
939
940 -// this is usefull for developers working on ACLK
940 +// this is useful for developers working on ACLK
941 // allows connecting agent to any MQTT broker
942 // for debugging, development and testing purposes
943 #ifndef ACLK_DISABLE_CHALLENGE
@@ -986,7 +986,7 @@ static inline void aclk_hello_msg()
986 aclk_shared_state.version_neg_wait_till = now_monotonic_usec() + USEC_PER_SEC * VERSION_NEG_TIMEOUT;
987 ACLK_SHARED_STATE_UNLOCK;
988
989 - //Hello message is versioned separatelly from the rest of the protocol
989 + //Hello message is versioned separately from the rest of the protocol
990 aclk_create_header(buf, "hello", msg_id, 0, 0, ACLK_VERSION_NEG_VERSION);
991 buffer_sprintf(buf, ",\"min-version\":%d,\"max-version\":%d}", ACLK_VERSION_MIN, ACLK_VERSION_MAX);
992 aclk_send_message(ACLK_METADATA_TOPIC, buf->buffer, msg_id);
@@ -1211,7 +1211,7 @@ exited:
1211 /*
1212 * this must be last -> if all static threads signal
1213 * THREAD_EXITED rrdengine will dealloc the RRDSETs
1214 - * and RRDDIMs that are used by still runing stat thread.
1214 + * and RRDDIMs that are used by still running stat thread.
1215 * see netdata_cleanup_and_exit() for reference
1216 */
1217 static_thread->enabled = NETDATA_MAIN_THREAD_EXITED;
@@ -1555,7 +1555,7 @@ void aclk_single_update_enable()
1555 aclk_disable_single_updates = 0;
1556 }
1557
1558 -// Trigged by a health reload, sends the alarm metadata
1558 +// Triggered by a health reload, sends the alarm metadata
1559 void aclk_alarm_reload()
1560 {
1561 if (unlikely(aclk_host_initializing(localhost)))
aclk/legacy/agent_cloud_link.h
+2 -2
@@ -24,7 +24,7 @@
24
25 #define ACLK_MAX_TOPIC 255
26
27 -#define ACLK_RECONNECT_DELAY 1 // reconnect delay -- with backoff stragegy fow now
27 +#define ACLK_RECONNECT_DELAY 1 // reconnect delay -- with backoff strategy for now
28 #define ACLK_DEFAULT_PORT 9002
29 #define ACLK_DEFAULT_HOST "localhost"
30
@@ -57,7 +57,7 @@ extern int aclk_send_message(char *sub_topic, char *message, char *msg_id);
57 extern int aclk_send_message_bin(char *sub_topic, const void *message, size_t len, char *msg_id);
58
59 extern char *is_agent_claimed(void);
60 -extern void aclk_lws_wss_mqtt_layer_disconect_notif();
60 +extern void aclk_lws_wss_mqtt_layer_disconnect_notif();
61 char *create_uuid();
62
63 // callbacks for agent cloud link
aclk/legacy/mqtt.c
+3 -3
@@ -55,7 +55,7 @@ void connect_callback(struct mosquitto *mosq, void *obj, int rc)
55 UNUSED(obj);
56 UNUSED(rc);
57
58 - info("Connection to cloud estabilished");
58 + info("Connection to cloud established");
59 aclk_connect();
60
61 return;
@@ -75,7 +75,7 @@ void disconnect_callback(struct mosquitto *mosq, void *obj, int rc)
75 }
76 aclk_disconnect();
77
78 - aclk_lws_wss_mqtt_layer_disconect_notif();
78 + aclk_lws_wss_mqtt_layer_disconnect_notif();
79
80 return;
81 }
@@ -170,7 +170,7 @@ static int _mqtt_create_connection(char *username, char *password)
170
171 int rc = mosquitto_threaded_set(mosq, 1);
172 if (unlikely(rc != MOSQ_ERR_SUCCESS))
173 - error("Failed to tune the thread model for libmoquitto (%s)", mosquitto_strerror(rc));
173 + error("Failed to tune the thread model for libmosquitto (%s)", mosquitto_strerror(rc));
174
175 #if defined(LIBMOSQUITTO_VERSION_NUMBER) >= 1006000
176 rc = mosquitto_int_option(mosq, MQTT_PROTOCOL_V311, 0);
aclk/legacy/tests/paho-inspection.py
+1 -1
@@ -55,5 +55,5 @@ mqttc.connect(sys.argv[1], 8443, 60)
55
56 #mqttc.publish("/agent/mine","Test1")
57 #mqttc.subscribe("$SYS/#", 0)
58 -print("Connected succesfully, monitoring /agent/#", flush=True)
58 +print("Connected successfully, monitoring /agent/#", flush=True)
59 mqttc.loop_forever()