diff --git a/src/plugin.c b/src/plugin.c
index d2e5f47cfea5365ae3ca418b7f160bb26bc7e3b1..98add242ce7ec84478b35e82507d8afd718792db 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
return (plugindir);
}
-void plugin_set_dir (char *dir)
+void plugin_set_dir (const char *dir)
{
if (plugindir != NULL)
free (plugindir);
/*
* Returns the plugins with the type `type' or NULL if it's not found.
*/
-plugin_t *plugin_search (char *type)
+plugin_t *plugin_search (const char *type)
{
plugin_t *ret;
}
#define BUFSIZE 512
-int plugin_load (char *type)
+int plugin_load (const char *type)
{
DIR *dh;
char *dir;
while ((de = readdir (dh)) != NULL)
{
- if (strncmp (de->d_name, typename, typename_len))
+ if (strncasecmp (de->d_name, typename, typename_len))
continue;
if (snprintf (filename, BUFSIZE, "%s/%s", dir, de->d_name) >= BUFSIZE)
if (plugin_search (type) != NULL)
return;
+#ifdef HAVE_LIBRRD
+ if ((operating_mode == MODE_LOCAL) || (operating_mode == MODE_CLIENT))
+#endif
+ 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)
return;