- pthread_mutex_lock (&size_mutex);
- type_list_incr (&size, type, bytes);
- pthread_mutex_unlock (&size_mutex);
- }
- else if ('s' == line[0]) { /* s:<value> */
- pthread_mutex_lock (&score_mutex);
- score = (score * (double)score_count + atof (line + 2))
- / (double)(score_count + 1);
- ++score_count;
- pthread_mutex_unlock (&score_mutex);
- }
- else if ('c' == line[0]) { /* c:<type1>[,<type2>,...] */
- char *ptr = NULL;
- char *type = strtok_r (line + 2, ",", &ptr);
-
- do {
- pthread_mutex_lock (&check_mutex);
- type_list_incr (&check, type, 1);
- pthread_mutex_unlock (&check_mutex);
- } while (NULL != (type = strtok_r (NULL, ",", &ptr)));
- }
- else {
- syslog (LOG_ERR, "email: unknown type '%c'", line[0]);
- }
-
- free (line);
- }
-
- /* put this thread back into the available list */
- pthread_mutex_lock (&active_mutex);
- {
- collector_t *last;
- collector_t *ptr;