Code

plugin: Log a warning in the main loop if there are no collectors.
authorSebastian Harl <sh@tokkee.org>
Wed, 20 Mar 2013 07:16:08 +0000 (00:16 -0700)
committerSebastian Harl <sh@tokkee.org>
Wed, 20 Mar 2013 07:16:08 +0000 (00:16 -0700)
src/core/plugin.c

index 7a8483f237abb70bc04f5d840e573191fdbd36c4..5df7059e9c6412b1c49bfc49813563a534f7d031 100644 (file)
@@ -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) {