X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fplugin.c;h=af894d54724c804a0bed9ae512b74fd533f9a18d;hb=c15dbfc3739f7c3bbd8171797eaef55749008bfa;hp=3682fa5bb307cad9a2793aa290fbb192d5b59db6;hpb=5f3702fcc67d68d428708e9cf5e5897ad2578925;p=collectd.git diff --git a/src/plugin.c b/src/plugin.c index 3682fa5b..af894d54 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -380,12 +380,15 @@ static void *plugin_read_thread (void __attribute__((unused)) *args) * we need to re-evaluate the condition every time * pthread_cond_timedwait returns. */ rc = 0; - while (!timeout_reached(rf->rf_next_read) && rc == 0) { + while ((read_loop != 0) + && !timeout_reached(rf->rf_next_read) + && rc == 0) + { rc = pthread_cond_timedwait (&read_cond, &read_lock, &rf->rf_next_read); } - /* Must hold `real_lock' when accessing `rf->rf_type'. */ + /* Must hold `read_lock' when accessing `rf->rf_type'. */ rf_type = rf->rf_type; pthread_mutex_unlock (&read_lock); @@ -1371,7 +1374,12 @@ int plugin_dispatch_values (value_list_t *vl) if (c_avl_get (data_sets, vl->type, (void *) &ds) != 0) { - INFO ("plugin_dispatch_values: Dataset not found: %s", vl->type); + char ident[6 * DATA_MAX_NAME_LEN]; + + FORMAT_VL (ident, sizeof (ident), vl); + INFO ("plugin_dispatch_values: Dataset not found: %s " + "(from \"%s\"), check your types.db!", + vl->type, ident); return (-1); }