[rrd-developers] [PATCH] [BUG] flush_file: when deciding whether to flush, check values_num, not values

kevin brintnall kbrint at rufus.net
Fri Sep 26 22:20:18 CEST 2008


Even though the old way works (due to NULL == 0), it's NOT right.

Sorry for the noise.  I should have caught this earlier.

---
 src/rrd_daemon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c
index 36d090c..f111637 100644
--- a/src/rrd_daemon.c
+++ b/src/rrd_daemon.c
@@ -745,7 +745,7 @@ static int flush_file (const char *filename) /* {{{ */
     return (ENOENT);
   }
 
-  if (ci->values > 0)
+  if (ci->values_num > 0)
   {
     /* Enqueue at head */
     enqueue_cache_item (ci, HEAD);
-- 
1.6.0.2



More information about the rrd-developers mailing list