X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fplugin.c;h=fc79668db24d017b24dca717615568192d73fd24;hb=327ea9f5f8275f21db31a1c7af9d5897feadb16a;hp=ce4c943753526eff1889bb1600ac1d036cac3733;hpb=e4303e15b78495d993abd69ce41ba163f2cadf34;p=collectd.git diff --git a/src/plugin.c b/src/plugin.c index ce4c9437..fc79668d 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -25,7 +25,7 @@ #include #include "plugin.h" -#include "multicast.h" +#include "network.h" typedef struct plugin { @@ -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) @@ -333,7 +333,7 @@ void plugin_write (char *host, char *type, char *inst, char *val) /* * Receive data from the plugin/module and get it somehow to ``plugin_write'': - * Either using ``multicast_send'' (when in network/client mode) or call it + * Either using ``network_send'' (when in network/client mode) or call it * directly (in local mode). */ void plugin_submit (char *type, char *inst, char *val) @@ -342,10 +342,10 @@ void plugin_submit (char *type, char *inst, char *val) if (operating_mode == MODE_LOCAL) plugin_write (NULL, type, inst, val); else if (operating_mode == MODE_CLIENT) - multicast_send (type, inst, val); + network_send (type, inst, val); else /* operating_mode == MODE_SERVER */ syslog (LOG_ERR, "WTF is the server doing in ``plugin_submit''?!?\n"); #else - multicast_send (type, inst, val); + network_send (type, inst, val); #endif }