From: Florian Forster Date: Wed, 23 Jan 2008 12:52:38 +0000 (+0100) Subject: unixsock plugin: Imported the new `putnotif' command from the appropriate module. X-Git-Tag: collectd-4.3.0beta0~20 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=662d3ce7c483a33c4873ee8c1a917245ab286dff;p=collectd.git unixsock plugin: Imported the new `putnotif' command from the appropriate module. --- 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]);