This patch removes an extra "SIGNALS" section in the rrdcached.pod and
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 28 Sep 2008 21:36:46 +0000 (21:36 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 28 Sep 2008 21:36:46 +0000 (21:36 +0000)
merges "[BUG] fixed hang in flush_file() introduced by per-file flush
condition". --  kevin brintnall

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1542 a5681a0c-68f1-0310-ab6d-d61299d08faa

doc/rrdcached.pod
src/rrd_daemon.c

index 8ed2979..c75b9e0 100644 (file)
@@ -451,16 +451,6 @@ updates WILL BE LOST>.
 
 =back
 
-=head1 SIGNALS
-
-=over 4
-
-=item SIGINT and SIGTERM
-
-The daemon exits normally on receipt of either of these signals.
-
-=back
-
 =head1 BUGS
 
 No known bugs at the moment.
index e2330a8..f92de21 100644 (file)
@@ -814,10 +814,13 @@ static int flush_file (const char *filename) /* {{{ */
     return (ENOENT);
   }
 
-  /* Enqueue at head */
-  enqueue_cache_item (ci, HEAD);
+  if (ci->values_num > 0)
+  {
+    /* Enqueue at head */
+    enqueue_cache_item (ci, HEAD);
+    pthread_cond_wait(&ci->flushed, &cache_lock);
+  }
 
-  pthread_cond_wait(&ci->flushed, &cache_lock);
   pthread_mutex_unlock(&cache_lock);
 
   return (0);