summaryrefslogtreecommitdiffstats
path: root/database/contexts/metric.c
diff options
context:
space:
mode:
Diffstat (limited to 'database/contexts/metric.c')
-rw-r--r--database/contexts/metric.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/database/contexts/metric.c b/database/contexts/metric.c
index 80756b54..55efde4e 100644
--- a/database/contexts/metric.c
+++ b/database/contexts/metric.c
@@ -33,7 +33,7 @@ inline NETDATA_DOUBLE rrdmetric_acquired_last_stored_value(RRDMETRIC_ACQUIRED *r
RRDMETRIC *rm = rrdmetric_acquired_value(rma);
if(rm->rrddim)
- return rm->rrddim->last_stored_value;
+ return rm->rrddim->collector.last_stored_value;
return NAN;
}
@@ -263,13 +263,13 @@ void rrdmetric_from_rrddim(RRDDIM *rd) {
#define rrddim_get_rrdmetric(rd) rrddim_get_rrdmetric_with_trace(rd, __FUNCTION__)
static inline RRDMETRIC *rrddim_get_rrdmetric_with_trace(RRDDIM *rd, const char *function) {
if(unlikely(!rd->rrdmetric)) {
- error("RRDMETRIC: RRDDIM '%s' is not linked to an RRDMETRIC at %s()", rrddim_id(rd), function);
+ netdata_log_error("RRDMETRIC: RRDDIM '%s' is not linked to an RRDMETRIC at %s()", rrddim_id(rd), function);
return NULL;
}
RRDMETRIC *rm = rrdmetric_acquired_value(rd->rrdmetric);
if(unlikely(!rm)) {
- error("RRDMETRIC: RRDDIM '%s' lost the link to its RRDMETRIC at %s()", rrddim_id(rd), function);
+ netdata_log_error("RRDMETRIC: RRDDIM '%s' lost the link to its RRDMETRIC at %s()", rrddim_id(rd), function);
return NULL;
}