Code

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 35d79c6dd600e0fee636180a33a4b813e9bd7ffa..30ea1ee38d6f9e2611eaa78134e36e85a464a126 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 3dd0b3dbbf7827613eabb76e06553cd4173e2c1a..a3ffd09473a0b02b2903b3b9da8eabf072d79ae9 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]);