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
=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.
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);