src/rrd_daemon.c: enqueue_cache_item: Don't enqueue cache items without values.
authorFlorian Forster <octo@leeloo.home.verplant.org>
Sun, 22 Jun 2008 20:09:31 +0000 (22:09 +0200)
committerFlorian Forster <octo@leeloo.home.verplant.org>
Sun, 22 Jun 2008 20:09:31 +0000 (22:09 +0200)
src/rrd_daemon.c

index 5f25e15..61e1d9a 100644 (file)
@@ -167,7 +167,7 @@ static void sig_term_handler (int s __attribute__((unused))) /* {{{ */
  */
 static int enqueue_cache_item (cache_item_t *ci) /* {{{ */
 {
-  RRDD_LOG (LOG_DEBUG, "handle_request_update: Adding %s to the update queue.",
+  RRDD_LOG (LOG_DEBUG, "enqueue_cache_item: Adding %s to the update queue.",
       ci->file);
 
   if (ci == NULL)
@@ -178,6 +178,9 @@ static int enqueue_cache_item (cache_item_t *ci) /* {{{ */
 
   assert (ci->next == NULL);
 
+  if (ci->values_num == 0)
+    return (0);
+
   if (cache_queue_tail == NULL)
     cache_queue_head = ci;
   else