Code

Added `network.c' which will replace `multicast.c' at some point..
[collectd.git] / src / plugin.c
index ce4c943753526eff1889bb1600ac1d036cac3733..98add242ce7ec84478b35e82507d8afd718792db 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);
@@ -292,7 +292,7 @@ void plugin_register (char *type,
 #ifdef HAVE_LIBRRD
        if ((operating_mode == MODE_LOCAL) || (operating_mode == MODE_CLIENT))
 #endif
-               if (read == NULL)
+               if ((init != NULL) && (read == NULL))
                        syslog (LOG_NOTICE, "Plugin `%s' doesn't provide a read function.", type);
 
        if ((p = (plugin_t *) malloc (sizeof (plugin_t))) == NULL)