diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:33:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:34:10 +0000 |
commit | 83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch) | |
tree | 2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/streaming/replication.c | |
parent | Releasing debian version 1.47.5-1. (diff) | |
download | netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip |
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/streaming/replication.c')
-rw-r--r-- | src/streaming/replication.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/streaming/replication.c b/src/streaming/replication.c index 1f5aeb34c..1f2c3140d 100644 --- a/src/streaming/replication.c +++ b/src/streaming/replication.c @@ -612,6 +612,7 @@ static struct replication_query *replication_response_prepare( } void replication_response_cancel_and_finalize(struct replication_query *q) { + if(!q) return; replication_query_finalize(NULL, q, false); } @@ -718,7 +719,7 @@ bool replication_response_execute_and_finalize(struct replication_query *q, size struct replication_request_details { struct { send_command callback; - void *data; + struct parser *parser; } caller; RRDHOST *host; @@ -826,7 +827,7 @@ static bool send_replay_chart_cmd(struct replication_request_details *r, const c rrdset_id(st), r->wanted.start_streaming ? "true" : "false", (unsigned long long)r->wanted.after, (unsigned long long)r->wanted.before); - ssize_t ret = r->caller.callback(buffer, r->caller.data); + ssize_t ret = r->caller.callback(buffer, r->caller.parser); if (ret < 0) { netdata_log_error("REPLAY ERROR: 'host:%s/chart:%s' failed to send replication request to child (error %zd)", rrdhost_hostname(r->host), rrdset_id(r->st), ret); @@ -836,14 +837,14 @@ static bool send_replay_chart_cmd(struct replication_request_details *r, const c return true; } -bool replicate_chart_request(send_command callback, void *callback_data, RRDHOST *host, RRDSET *st, +bool replicate_chart_request(send_command callback, struct parser *parser, RRDHOST *host, RRDSET *st, time_t child_first_entry, time_t child_last_entry, time_t child_wall_clock_time, time_t prev_first_entry_wanted, time_t prev_last_entry_wanted) { struct replication_request_details r = { .caller = { .callback = callback, - .data = callback_data, + .parser = parser, }, .host = host, |