From 662d3ce7c483a33c4873ee8c1a917245ab286dff Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 23 Jan 2008 13:52:38 +0100 Subject: [PATCH] unixsock plugin: Imported the new `putnotif' command from the appropriate module. --- src/Makefile.am | 2 +- src/unixsock.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 35d79c6d..30ea1ee3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/unixsock.c b/src/unixsock.c index 3dd0b3db..a3ffd094 100644 --- a/src/unixsock.c +++ b/src/unixsock.c @@ -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 @@ -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]); -- 2.11.0