X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Femail.c;h=509eb2305532c9d1d199ed441640df470cf4316a;hb=86090b3d409634d016da7bbb0cbe43ed5a851d30;hp=64b82e465c1af5ea9df81f0eb59fbfdf50f7478e;hpb=f179018be96e1e1aea25d4928bdaf100a9a92a7d;p=collectd.git diff --git a/src/email.c b/src/email.c index 64b82e46..509eb230 100644 --- a/src/email.c +++ b/src/email.c @@ -486,9 +486,11 @@ static void *collect (void *arg) type_list_incr (&count, type, 1); pthread_mutex_unlock (&count_mutex); - pthread_mutex_lock (&size_mutex); - type_list_incr (&size, type, bytes); - pthread_mutex_unlock (&size_mutex); + if (bytes > 0) { + pthread_mutex_lock (&size_mutex); + type_list_incr (&size, type, bytes); + pthread_mutex_unlock (&size_mutex); + } } else if ('s' == line[0]) { /* s: */ pthread_mutex_lock (&score_mutex);