X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdaemon%2Fplugin.c;h=831e3fb0311398c5c1b75cddc67b5e5d4b2b8c0e;hb=0c5e4282f0f4e332499feac3b07ce0f29e3d2b1c;hp=2f933c00c4551eb4adf70f5610c85b17666041c5;hpb=e460da6b5715e55c57731dcda31a228502b02b5b;p=collectd.git diff --git a/src/daemon/plugin.c b/src/daemon/plugin.c index 2f933c00..831e3fb0 100644 --- a/src/daemon/plugin.c +++ b/src/daemon/plugin.c @@ -241,13 +241,13 @@ static void destroy_read_heap (void) /* {{{ */ while (42) { - callback_func_t *cf; + read_func_t *rf; - cf = c_heap_get_root (read_heap); - if (cf == NULL) + rf = c_heap_get_root (read_heap); + if (rf == NULL) break; - - destroy_callback (cf); + sfree (rf->rf_name); + destroy_callback ((callback_func_t *) rf); } c_heap_destroy (read_heap); @@ -1089,6 +1089,7 @@ int plugin_load (char const *plugin_name, uint32_t flags) /* success */ plugin_mark_loaded (plugin_name); ret = 0; + INFO ("plugin_load: plugin \"%s\" successfully loaded.", plugin_name); break; } else @@ -1724,8 +1725,6 @@ void plugin_init_all (void) write_threads_num = 5; } - start_write_threads ((size_t) write_threads_num); - if ((list_init == NULL) && (read_heap == NULL)) return; @@ -1761,6 +1760,8 @@ void plugin_init_all (void) le = le->next; } + start_write_threads ((size_t) write_threads_num); + max_read_interval = global_option_get_time ("MaxReadInterval", DEFAULT_MAX_READ_INTERVAL);