diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-18 15:22:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-18 15:22:14 +0000 |
commit | 970987c0d6e99ef0db866a09396d5613042a94d1 (patch) | |
tree | af21bdbc146083814d19b8d553f15e671ae7fd24 /aclk/legacy/aclk_lws_wss_client.c | |
parent | Releasing debian version 1.29.1-3. (diff) | |
download | netdata-970987c0d6e99ef0db866a09396d5613042a94d1.tar.xz netdata-970987c0d6e99ef0db866a09396d5613042a94d1.zip |
Merging upstream version 1.29.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | aclk/legacy/aclk_lws_wss_client.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/aclk/legacy/aclk_lws_wss_client.c b/aclk/legacy/aclk_lws_wss_client.c index 2e6fd4ec8..f06df3f42 100644 --- a/aclk/legacy/aclk_lws_wss_client.c +++ b/aclk/legacy/aclk_lws_wss_client.c @@ -377,7 +377,9 @@ static const char *aclk_lws_callback_name(enum lws_callback_reasons reason) return "LWS_CALLBACK_EVENT_WAIT_CANCELLED"; default: // Not using an internal buffer here for thread-safety with unknown calling context. +#ifdef ACLK_TRP_DEBUG_VERBOSE error("Unknown LWS callback %u", reason); +#endif return "unknown"; } } @@ -489,7 +491,9 @@ static int aclk_lws_wss_callback(struct lws *wsi, enum lws_callback_reasons reas case LWS_CALLBACK_EVENT_WAIT_CANCELLED: case LWS_CALLBACK_OPENSSL_PERFORM_SERVER_CERT_VERIFICATION: // Expected and safe to ignore. +#ifdef ACLK_TRP_DEBUG_VERBOSE debug(D_ACLK, "Ignoring expected callback from LWS: %s", aclk_lws_callback_name(reason)); +#endif return retval; default: @@ -497,7 +501,9 @@ static int aclk_lws_wss_callback(struct lws *wsi, enum lws_callback_reasons reas break; } // Log to info - volume is proportional to connection attempts. +#ifdef ACLK_TRP_DEBUG_VERBOSE info("Processing callback %s", aclk_lws_callback_name(reason)); +#endif switch (reason) { case LWS_CALLBACK_PROTOCOL_INIT: aclk_lws_wss_connect(engine_instance->host, engine_instance->port); // Makes the outgoing connection @@ -531,7 +537,9 @@ static int aclk_lws_wss_callback(struct lws *wsi, enum lws_callback_reasons reas break; default: +#ifdef ACLK_TRP_DEBUG_VERBOSE error("Unexpected callback from libwebsockets %s", aclk_lws_callback_name(reason)); +#endif break; } return retval; //0-OK, other connection should be closed! |