From: Sebastian Harl Date: Wed, 20 Mar 2013 07:16:08 +0000 (-0700) Subject: plugin: Log a warning in the main loop if there are no collectors. X-Git-Tag: sysdb-0.1.0~418 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=131f389f1cba807b5ed9bf76fe3bdb8c030b47cf;p=sysdb.git plugin: Log a warning in the main loop if there are no collectors. --- diff --git a/src/core/plugin.c b/src/core/plugin.c index 7a8483f..5df7059 100644 --- a/src/core/plugin.c +++ b/src/core/plugin.c @@ -567,7 +567,13 @@ sdb_plugin_init_all(void) int sdb_plugin_collector_loop(sdb_plugin_loop_t *loop) { - if ((! collector_list) || (! loop)) + if (! collector_list) { + sdb_log(SDB_LOG_WARNING, "plugin: No collectors registered. " + "Quiting main loop."); + return -1; + } + + if (! loop) return -1; while (loop->do_loop) {