unixsock plugin: Imported the new `putnotif' command from the appropriate module.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Wed, 23 Jan 2008 12:52:38 +0000 (13:52 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Wed, 23 Jan 2008 12:52:38 +0000 (13:52 +0100)
src/Makefile.am
src/unixsock.c

index 35d79c6..30ea1ee 100644 (file)
@@ -581,7 +581,7 @@ endif
 
 if BUILD_PLUGIN_UNIXSOCK
 pkglib_LTLIBRARIES += unixsock.la
-unixsock_la_SOURCES = unixsock.c utils_cmd_putval.h utils_cmd_putval.c
+unixsock_la_SOURCES = unixsock.c utils_cmd_putval.h utils_cmd_putval.c utils_cmd_putnotif.h utils_cmd_putnotif.c
 unixsock_la_LDFLAGS = -module -avoid-version -lpthread
 collectd_LDADD += "-dlopen" unixsock.la
 collectd_DEPENDENCIES += unixsock.la
index 3dd0b3d..a3ffd09 100644 (file)
@@ -23,7 +23,9 @@
 #include "common.h"
 #include "plugin.h"
 #include "configfile.h"
+
 #include "utils_cmd_putval.h"
+#include "utils_cmd_putnotif.h"
 
 /* Folks without pthread will need to disable this plugin. */
 #include <pthread.h>
@@ -601,6 +603,10 @@ static void *us_handle_client (void *arg)
                {
                        us_handle_listval (fh, fields, fields_num);
                }
+               else if (strcasecmp (fields[0], "putnotif") == 0)
+               {
+                       handle_putnotif (fh, fields, fields_num);
+               }
                else
                {
                        fprintf (fh, "-1 Unknown command: %s\n", fields[0]);