X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Funixsock.c;h=7e7a1b1a857eb73c4529dd038d011f3b19cf1ed7;hb=172dcccf29a7429a787d7e8b3457db1bee501585;hp=0dc7d659400193a8bf29fc0ab3f78a9556826a90;hpb=2fb1d3a320cba6abe16fe1e1d22ba085c465b6a8;p=collectd.git diff --git a/src/unixsock.c b/src/unixsock.c index 0dc7d659..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); @@ -363,7 +368,8 @@ static void *us_server_thread (void __attribute__((unused)) *arg) DEBUG ("Spawning child to handle connection on fd #%i", *remote_fd); - status = pthread_create (&th, &th_attr, us_handle_client, (void *) remote_fd); + status = plugin_thread_create (&th, &th_attr, + us_handle_client, (void *) remote_fd); if (status != 0) { char errbuf[1024]; @@ -443,7 +449,8 @@ static int us_init (void) loop = 1; - status = pthread_create (&listen_thread, NULL, us_server_thread, NULL); + status = plugin_thread_create (&listen_thread, NULL, + us_server_thread, NULL); if (status != 0) { char errbuf[1024];