Code

Added the functions `strjoin' and `escape_slashes' to `common.c'.
[collectd.git] / src / plugin.c
index 87668d7b3d321218bc49114640dbe4cd4977b518..abc08e579688e179889ca14d88f32a2fd812a9b2 100644 (file)
@@ -52,7 +52,7 @@ char *plugin_get_dir (void)
                return (plugindir);
 }
 
-void plugin_set_dir (char *dir)
+void plugin_set_dir (const char *dir)
 {
        if (plugindir != NULL)
                free (plugindir);
@@ -289,6 +289,12 @@ void plugin_register (char *type,
        if (plugin_search (type) != NULL)
                return;
 
+#ifdef HAVE_LIBRRD
+       if ((operating_mode == MODE_LOCAL) || (operating_mode == MODE_CLIENT))
+#endif
+               if (read == NULL)
+                       syslog (LOG_NOTICE, "Plugin `%s' doesn't provide a read function.", type);
+
        if ((p = (plugin_t *) malloc (sizeof (plugin_t))) == NULL)
                return;