From 422a90c1ef680568e3885c376fa5c2a97cb8edd7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Luis=20Sanmart=C3=ADn=20Rozada?= Date: Sat, 26 Jul 2014 00:01:41 +0200 Subject: [PATCH] Renable getthreshold cmd in unixsock Plugin. --- src/Makefile.am | 1 + src/unixsock.c | 5 +++++ src/utils_cmd_getthreshold.c | 1 + 3 files changed, 7 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index 86995265..1ffd7854 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1285,6 +1285,7 @@ pkglib_LTLIBRARIES += unixsock.la unixsock_la_SOURCES = unixsock.c \ utils_cmd_flush.h utils_cmd_flush.c \ utils_cmd_getval.h utils_cmd_getval.c \ + utils_cmd_getthreshold.h utils_cmd_getthreshold.c \ utils_cmd_listval.h utils_cmd_listval.c \ utils_cmd_putval.h utils_cmd_putval.c \ utils_cmd_putnotif.h utils_cmd_putnotif.c diff --git a/src/unixsock.c b/src/unixsock.c index 2c1665fc..7e7a1b1a 100644 --- a/src/unixsock.c +++ b/src/unixsock.c @@ -26,6 +26,7 @@ #include "utils_cmd_flush.h" #include "utils_cmd_getval.h" +#include "utils_cmd_getthreshold.h" #include "utils_cmd_listval.h" #include "utils_cmd_putval.h" #include "utils_cmd_putnotif.h" @@ -281,6 +282,10 @@ static void *us_handle_client (void *arg) { handle_getval (fhout, buffer); } + else if (strcasecmp (fields[0], "getthreshold") == 0) + { + handle_getthreshold (fhout, buffer); + } else if (strcasecmp (fields[0], "putval") == 0) { handle_putval (fhout, buffer); diff --git a/src/utils_cmd_getthreshold.c b/src/utils_cmd_getthreshold.c index e8c29fa3..b8249c6a 100644 --- a/src/utils_cmd_getthreshold.c +++ b/src/utils_cmd_getthreshold.c @@ -23,6 +23,7 @@ #include "common.h" #include "plugin.h" +#include "utils_avltree.h" #include "utils_threshold.h" #include "utils_parse_option.h" /* for `parse_string' */ #include "utils_cmd_getthreshold.h" -- 2.11.0