diff options
author | Timo <timotej@netdata.cloud> | 2022-07-14 13:48:37 +0200 |
---|---|---|
committer | Timo <timotej@netdata.cloud> | 2022-07-14 13:48:37 +0200 |
commit | 635825572d3a4866153b661ffd454c0ffcbf77f5 (patch) | |
tree | 3643e604a9591848c0025be90a609f814a9d046a | |
parent | 6bbdf00cfd1e13a5b69aba183ba3795d2185d2e8 (diff) |
remove env negotiation
-rw-r--r-- | aclk/aclk.c | 10 | ||||
-rw-r--r-- | aclk/aclk_rx_msgs.c | 10 |
2 files changed, 2 insertions, 18 deletions
diff --git a/aclk/aclk.c b/aclk/aclk.c index d3f965389e..b64893c817 100644 --- a/aclk/aclk.c +++ b/aclk/aclk.c @@ -542,16 +542,6 @@ static int aclk_attempt_to_connect(mqtt_wss_client client) } info("New ACLK protobuf protocol negotiated successfully (/env response)."); - aclk_ctx_based = 0; - if (aclk_env_has_capa("ctx") || rrdcontext_enabled) { - if (rrdcontext_enabled) { - aclk_ctx_based = 1; - info ("New CONTEXT based communication to be used"); - } else { - error_report("Cloud wants us to use context based communication but we are not capable of it"); - } - } - memset(&auth_url, 0, sizeof(url_t)); if (url_parse(aclk_env->auth_endpoint, &auth_url)) { error("Parsing URL returned by env endpoint for authentication failed. \"%s\"", aclk_env->auth_endpoint); diff --git a/aclk/aclk_rx_msgs.c b/aclk/aclk_rx_msgs.c index a1a7958528..445d2f193c 100644 --- a/aclk/aclk_rx_msgs.c +++ b/aclk/aclk_rx_msgs.c @@ -313,10 +313,7 @@ int send_node_instances(const char *msg, size_t msg_len) int stream_charts_and_dimensions(const char *msg, size_t msg_len) { - if (aclk_ctx_based) { - error_report("Got StreamChartsAndDimensions in Context mode! Ignoring"); - return 1; - } + aclk_ctx_based = 0; stream_charts_and_dims_t res = parse_stream_charts_and_dims(msg, msg_len); if (!res.claim_id || !res.node_id) { error("Error parsing StreamChartsAndDimensions msg"); @@ -432,10 +429,7 @@ int handle_disconnect_req(const char *msg, size_t msg_len) int contexts_checkpoint(const char *msg, size_t msg_len) { - if (!aclk_ctx_based) { - error_report("Received ContextsCheckpoint message but context based communication was not enabled (Cloud violated the protocol). Ignoring message"); - return 1; - } + aclk_ctx_based = 1; struct ctxs_checkpoint *cmd = parse_ctxs_checkpoint(msg, msg_len); if (!cmd) |