Merge remote-tracking branch 'github/pr/1901'
authorFlorian Forster <octo@collectd.org>
Fri, 2 Sep 2016 06:23:46 +0000 (08:23 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 2 Sep 2016 06:23:46 +0000 (08:23 +0200)
src/ceph.c
src/dbi.c

index e6d3767..ad0688c 100644 (file)
@@ -1468,6 +1468,12 @@ static int cconn_main_loop(uint32_t request_type)
     struct timeval end_tv;
     struct cconn io_array[g_num_daemons];
 
+    if (g_num_daemons < 1)
+    {
+        ERROR ("ceph plugin: No daemons configured. See the \"Daemon\" config option.");
+        return ENOENT;
+    }
+
     DEBUG("ceph plugin: entering cconn_main_loop(request_type = %d)", request_type);
 
     /* create cconn array */
index 068bf4d..19d4b0a 100644 (file)
--- a/src/dbi.c
+++ b/src/dbi.c
@@ -452,14 +452,14 @@ static int cdbi_init (void) /* {{{ */
   if (queries_num == 0)
   {
     ERROR ("dbi plugin: No <Query> blocks have been found. Without them, "
-        "this plugin can't do anything useful, so we will returns an error.");
+        "this plugin can't do anything useful, so we will return an error.");
     return (-1);
   }
 
   if (databases_num == 0)
   {
     ERROR ("dbi plugin: No <Database> blocks have been found. Without them, "
-        "this plugin can't do anything useful, so we will returns an error.");
+        "this plugin can't do anything useful, so we will return an error.");
     return (-1);
   }