[collectd] [PATCH] rrdtool plugin: Added a flush callback.

bd at bc-bd.org bd at bc-bd.org
Wed Feb 27 11:39:19 CET 2008

> +static int rrd_flush (const int timeout)
> +{
> +	if (cache == NULL)
> +		return (0);

Shouldn't this check be made with the lock held? I am not sure but else
we might have a race condition here.

> +	pthread_mutex_lock (&cache_lock);


A soft drink turneth away company.

More information about the collectd mailing list