]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixed some typos 07/1707/1
authorDavid M. Lee <dlee@respoke.io>
Tue, 24 Nov 2015 19:54:54 +0000 (13:54 -0600)
committerDavid M. Lee <dlee@respoke.io>
Tue, 24 Nov 2015 19:54:54 +0000 (13:54 -0600)
Fixes some minor typos in the CHANGES file, plus an embarrasing typo in
the StatsD API.

Change-Id: I9ca4858c64a4a07d2643b81baa64baebb27a4eb7

CHANGES
include/asterisk/statsd.h
res/res_endpoint_stats.c
res/res_pjsip/location.c
res/res_pjsip/pjsip_options.c
res/res_pjsip_outbound_registration.c

diff --git a/CHANGES b/CHANGES
index 6dd5efdb1d231151bbaa07f25c4dbad075f2f5cb..cd8a736438ebdd5d85ad8f071f8966377e86266d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -44,9 +44,9 @@ res_pjsip_outbound_registration
  * If res_statsd is loaded and a StatsD server is configured, basic statistics
    regarding the state of outbound registrations will now be emitted. This
    includes:
-   - A GUAGE statistic for the overall number of outbound registrations, i.e.:
+   - A GAUGE statistic for the overall number of outbound registrations, i.e.:
        PJSIP.registrations.count
-   - A GUAGE statistic for the overall number of outbound registrations in a
+   - A GAUGE statistic for the overall number of outbound registrations in a
      particular state, e.g.:
        PJSIP.registrations.state.Registered
 
@@ -57,7 +57,7 @@ res_pjsip
 
  * If res_statsd is loaded and a StatsD server is configured, basic statistics
    regarding the state of PJSIP contacts will not be emitted. This includes:
-   - A GUAGE statistic for the overall number of contacts in a particular
+   - A GAUGE statistic for the overall number of contacts in a particular
      state, e.g.:
        PJSIP.contacts.states.Reachable
    - A TIMER statistic for the RTT time for each qualified contact, e.g.:
@@ -77,9 +77,9 @@ res_endpoint_stats
 -------------------
  * A new module that emits StatsD statistics regarding Asterisk endpoints.
    This includes a total count of the number of endpoints, the count of the
-   number of endpoints in the technology agnosti state of the endpoint -
+   number of endpoints in the technology agnostic state of the endpoint -
    online or offline - as well as the number of channels associated with each
-   endpoint. These are recorded as three differeng GUAGE statistics:
+   endpoint. These are recorded as three different GAUGE statistics:
     - endpoints.count
     - endpoints.state.{unknown|offline|online}
     - endpoints.{tech}.{resource}.channels
index c4ecce8f600c21e8aaaa35cd53c1dc1694c08459..4cbd213ad0da33c484424f860799c1c8989d4dd9 100644 (file)
 #include "asterisk/optional_api.h"
 
 /*! An instantaneous measurement of a value. */
-#define AST_STATSD_GUAGE "g"
+#define AST_STATSD_GAUGE "g"
+/*!
+ * Embarrassingly, gauge was misspelled for quite some time.
+ * \deprecated You should spell gauge correctly.
+ */
+#define AST_STATSD_GUAGE AST_STATSD_GAUGE
 /*! A change in a value. */
 #define AST_STATSD_COUNTER "c"
 /*! Measure of milliseconds. */
@@ -71,7 +76,7 @@ AST_OPTIONAL_API(void, ast_statsd_log_string, (const char *metric_name,
  *
  * Example Usage:
  * \code
- *     ast_statsd_log_string_va(AST_STATSD_GUAGE, "+1", 1.0, "endpoints.states.%s", state_name);
+ *     ast_statsd_log_string_va(AST_STATSD_GAUGE, "+1", 1.0, "endpoints.states.%s", state_name);
  * \endcode
  */
 AST_OPTIONAL_API_ATTR(void, format(printf, 1, 5), ast_statsd_log_string_va,
index 1e1123ea87a59617331842cccb25abd52bdb90a6..6b84794338b89554ec96e18c7cbab271cef38173 100644 (file)
@@ -48,13 +48,13 @@ static void update_endpoint_state(struct ast_endpoint_snapshot *snapshot, const
 {
        switch (snapshot->state) {
        case AST_ENDPOINT_UNKNOWN:
-               ast_statsd_log_string("endpoints.state.unknown", AST_STATSD_GUAGE, delta, 1.0);
+               ast_statsd_log_string("endpoints.state.unknown", AST_STATSD_GAUGE, delta, 1.0);
                break;
        case AST_ENDPOINT_OFFLINE:
-               ast_statsd_log_string("endpoints.state.offline", AST_STATSD_GUAGE, delta, 1.0);
+               ast_statsd_log_string("endpoints.state.offline", AST_STATSD_GAUGE, delta, 1.0);
                break;
        case AST_ENDPOINT_ONLINE:
-               ast_statsd_log_string("endpoints.state.online", AST_STATSD_GUAGE, delta, 1.0);
+               ast_statsd_log_string("endpoints.state.online", AST_STATSD_GAUGE, delta, 1.0);
                break;
        }
 }
@@ -62,17 +62,17 @@ static void update_endpoint_state(struct ast_endpoint_snapshot *snapshot, const
 static void handle_endpoint_update(struct ast_endpoint_snapshot *old_snapshot, struct ast_endpoint_snapshot *new_snapshot)
 {
        if (!old_snapshot && new_snapshot) {
-               ast_statsd_log_string("endpoints.count", AST_STATSD_GUAGE, "+1", 1.0);
+               ast_statsd_log_string("endpoints.count", AST_STATSD_GAUGE, "+1", 1.0);
                update_endpoint_state(new_snapshot, "+1");
        } else if (old_snapshot && !new_snapshot) {
-               ast_statsd_log_string("endpoints.count", AST_STATSD_GUAGE, "-1", 1.0);
+               ast_statsd_log_string("endpoints.count", AST_STATSD_GAUGE, "-1", 1.0);
                update_endpoint_state(old_snapshot, "-1");
        } else {
                if (old_snapshot->state != new_snapshot->state) {
                        update_endpoint_state(old_snapshot, "-1");
                        update_endpoint_state(new_snapshot, "+1");
                }
-               ast_statsd_log_full_va("endpoints.%s.%s.channels", AST_STATSD_GUAGE, new_snapshot->num_channels, 1.0,
+               ast_statsd_log_full_va("endpoints.%s.%s.channels", AST_STATSD_GAUGE, new_snapshot->num_channels, 1.0,
                        new_snapshot->tech, new_snapshot->resource);
        }
 }
index 9cc7f1629d559b1eb86e97c1622833b498779b2f..2e0d84b84a44d9debab1876bc8f3d98aa6a8443e 100644 (file)
@@ -1015,7 +1015,7 @@ int ast_sip_initialize_sorcery_location(void)
         * object before PJSIP options handling is initialized.
         */
        for (i = 0; i < REMOVED; i++) {
-               ast_statsd_log_full_va("PJSIP.contacts.states.%s", AST_STATSD_GUAGE, 0, 1.0, ast_sip_get_contact_status_label(i));
+               ast_statsd_log_full_va("PJSIP.contacts.states.%s", AST_STATSD_GAUGE, 0, 1.0, ast_sip_get_contact_status_label(i));
        }
 
        return 0;
index 58519a91f7394947d3c4621c7574bab3f3fc341f..b1724896d76c5555f82d05218ddfb9b863e6ef79 100644 (file)
@@ -114,7 +114,7 @@ struct ast_sip_contact_status *ast_res_pjsip_find_or_create_contact_status(const
                return NULL;
        }
 
-       ast_statsd_log_string_va("PJSIP.contacts.states.%s", AST_STATSD_GUAGE,
+       ast_statsd_log_string_va("PJSIP.contacts.states.%s", AST_STATSD_GAUGE,
                "+1", 1.0, ast_sip_get_contact_status_label(status->status));
 
        return status;
@@ -148,9 +148,9 @@ static void update_contact_status(const struct ast_sip_contact *contact,
        update->last_status = status->status;
        update->status = value;
        if (update->last_status != update->status) {
-               ast_statsd_log_string_va("PJSIP.contacts.states.%s", AST_STATSD_GUAGE,
+               ast_statsd_log_string_va("PJSIP.contacts.states.%s", AST_STATSD_GAUGE,
                        "-1", 1.0, ast_sip_get_contact_status_label(update->last_status));
-               ast_statsd_log_string_va("PJSIP.contacts.states.%s", AST_STATSD_GUAGE,
+               ast_statsd_log_string_va("PJSIP.contacts.states.%s", AST_STATSD_GAUGE,
                        "+1", 1.0, ast_sip_get_contact_status_label(update->status));
        }
 
index 6f3155d8b7c0ebee67dbb1ae4f866f20b5ac8682..4ba57481b6c61fab41b931d10ec1640a9930b6eb 100644 (file)
@@ -619,9 +619,9 @@ static void update_client_state_status(struct sip_outbound_registration_client_s
                return;
        }
 
-       ast_statsd_log_string_va("PJSIP.registrations.state.%s", AST_STATSD_GUAGE, "-1", 1.0,
+       ast_statsd_log_string_va("PJSIP.registrations.state.%s", AST_STATSD_GAUGE, "-1", 1.0,
                sip_outbound_registration_status_str(client_state->status));
-       ast_statsd_log_string_va("PJSIP.registrations.state.%s", AST_STATSD_GUAGE, "+1", 1.0,
+       ast_statsd_log_string_va("PJSIP.registrations.state.%s", AST_STATSD_GAUGE, "+1", 1.0,
                sip_outbound_registration_status_str(status));
        client_state->status = status;
 }
@@ -966,8 +966,8 @@ static void sip_outbound_registration_client_state_destroy(void *obj)
 {
        struct sip_outbound_registration_client_state *client_state = obj;
 
-       ast_statsd_log_string("PJSIP.registrations.count", AST_STATSD_GUAGE, "-1", 1.0);
-       ast_statsd_log_string_va("PJSIP.registrations.state.%s", AST_STATSD_GUAGE, "-1", 1.0,
+       ast_statsd_log_string("PJSIP.registrations.count", AST_STATSD_GAUGE, "-1", 1.0);
+       ast_statsd_log_string_va("PJSIP.registrations.state.%s", AST_STATSD_GAUGE, "-1", 1.0,
                sip_outbound_registration_status_str(client_state->status));
 
        ast_taskprocessor_unreference(client_state->serializer);
@@ -998,8 +998,8 @@ static struct sip_outbound_registration_state *sip_outbound_registration_state_a
        state->client_state->timer.user_data = state->client_state;
        state->client_state->timer.cb = sip_outbound_registration_timer_cb;
 
-       ast_statsd_log_string("PJSIP.registrations.count", AST_STATSD_GUAGE, "+1", 1.0);
-       ast_statsd_log_string_va("PJSIP.registrations.state.%s", AST_STATSD_GUAGE, "+1", 1.0,
+       ast_statsd_log_string("PJSIP.registrations.count", AST_STATSD_GAUGE, "+1", 1.0);
+       ast_statsd_log_string_va("PJSIP.registrations.state.%s", AST_STATSD_GAUGE, "+1", 1.0,
                sip_outbound_registration_status_str(state->client_state->status));
 
        state->registration = ao2_bump(registration);
@@ -2035,10 +2035,10 @@ static int load_module(void)
        ast_manager_register_xml("PJSIPShowRegistrationsOutbound", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, ami_show_outbound_registrations);
 
        /* Clear any previous statsd gauges in case we weren't shutdown cleanly */
-       ast_statsd_log("PJSIP.registrations.count", AST_STATSD_GUAGE, 0);
-       ast_statsd_log("PJSIP.registrations.state.Registered", AST_STATSD_GUAGE, 0);
-       ast_statsd_log("PJSIP.registrations.state.Unregistered", AST_STATSD_GUAGE, 0);
-       ast_statsd_log("PJSIP.registrations.state.Rejected", AST_STATSD_GUAGE, 0);
+       ast_statsd_log("PJSIP.registrations.count", AST_STATSD_GAUGE, 0);
+       ast_statsd_log("PJSIP.registrations.state.Registered", AST_STATSD_GAUGE, 0);
+       ast_statsd_log("PJSIP.registrations.state.Unregistered", AST_STATSD_GAUGE, 0);
+       ast_statsd_log("PJSIP.registrations.state.Rejected", AST_STATSD_GAUGE, 0);
 
        /* Load configuration objects */
        ast_sorcery_load_object(ast_sip_get_sorcery(), "registration");