diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2020-09-18 23:45:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-18 23:45:23 +0300 |
commit | 8194ac83f064814c86a332ab00634c50300646f8 (patch) | |
tree | 8e4ac7acd74dedb6c3d1a4e0d4940a9105b240fd /web | |
parent | 718d8872cb7a5280e37c60a53f7194cd5f2b3a21 (diff) |
Fixed chart's last accessed time during context queries (#9952)
Diffstat (limited to 'web')
-rw-r--r-- | web/api/formatters/rrd2json.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/api/formatters/rrd2json.c b/web/api/formatters/rrd2json.c index 7b07d398ed..00fe0c9480 100644 --- a/web/api/formatters/rrd2json.c +++ b/web/api/formatters/rrd2json.c @@ -141,7 +141,8 @@ int rrdset2anything_api_v1( , time_t *latest_timestamp , char *context ) { - st->last_accessed_time = now_realtime_sec(); + time_t last_accessed_time = now_realtime_sec(); + st->last_accessed_time = last_accessed_time; RRDDIM *temp_rd = NULL; @@ -153,6 +154,7 @@ int rrdset2anything_api_v1( // Loop the dimensions of the chart RRDDIM *rd1; rrdset_rdlock(st1); + st1->last_accessed_time = last_accessed_time; rrddim_foreach_read(rd1, st1) { RRDDIM *rd = mallocz(rd1->memsize); memcpy(rd, rd1, rd1->memsize); |