Merge branch 'collectd-5.5'
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 1 Mar 2016 10:28:16 +0000 (11:28 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 1 Mar 2016 10:28:16 +0000 (11:28 +0100)
16 files changed:
src/daemon/plugin.h
src/daemon/types_list.c
src/daemon/utils_random.c
src/daemon/utils_subst.c
src/liboconfig/oconfig.c
src/processes.c
src/sensors.c
src/threshold.c
src/utils_cmd_flush.c
src/utils_cmd_getval.c
src/utils_cmd_putnotif.c
src/utils_cmd_putval.c
src/utils_db_query.c
src/utils_latency.c
src/utils_latency.h
src/xmms.c

index b1adb52..54cac78 100644 (file)
@@ -459,4 +459,10 @@ cdtime_t plugin_get_interval (void);
 int plugin_thread_create (pthread_t *thread, const pthread_attr_t *attr,
                void *(*start_routine) (void *), void *arg);
 
+/*
+ * Plugins need to implement this
+ */
+
+void module_register (void);
+
 #endif /* PLUGIN_H */
index cf28c2e..eb50bb8 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "plugin.h"
 #include "configfile.h"
+#include "types_list.h"
 
 static int parse_ds (data_source_t *dsrc, char *buf, size_t buf_len)
 {
index b873845..548d1d8 100644 (file)
  *   Florian Forster <octo at collectd.org>
  **/
 
+#include <pthread.h>
+
 #include "collectd.h"
 #include "utils_time.h"
+#include "utils_random.h"
 
-#include <pthread.h>
 
 static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
 static _Bool have_seed = 0;
index 43634df..cfa1c76 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "collectd.h"
 #include "common.h"
+#include "utils_subst.h"
 
 char *subst (char *buf, size_t buflen, const char *string, size_t off1, size_t off2,
                const char *replacement)
index d01c79d..89ccdec 100644 (file)
@@ -193,7 +193,7 @@ oconfig_item_t *oconfig_clone (const oconfig_item_t *ci_orig)
   return (ci_copy);
 } /* oconfig_item_t *oconfig_clone */
 
-void oconfig_free_all (oconfig_item_t *ci)
+static void oconfig_free_all (oconfig_item_t *ci)
 {
   int i;
 
index aca2369..8e2443b 100644 (file)
@@ -1001,7 +1001,7 @@ static procstat_t *ps_read_io (long pid, procstat_t *ps)
        return (ps);
 } /* procstat_t *ps_read_io */
 
-int ps_read_process (long pid, procstat_t *ps, char *state)
+static int ps_read_process (long pid, procstat_t *ps, char *state)
 {
        char  filename[64];
        char  buffer[1024];
index f5b09bd..dc6a210 100644 (file)
@@ -265,7 +265,7 @@ static int sensors_config (const char *key, const char *value)
        return (0);
 }
 
-void sensors_free_features (void)
+static void sensors_free_features (void)
 {
        featurelist_t *thisft;
        featurelist_t *nextft;
index b753d37..ed83129 100644 (file)
@@ -868,7 +868,7 @@ static int ut_missing (const value_list_t *vl,
   return (0);
 } /* }}} int ut_missing */
 
-int ut_config (oconfig_item_t *ci)
+static int ut_config (oconfig_item_t *ci)
 { /* {{{ */
   int i;
   int status = 0;
index 8b34a75..4106166 100644 (file)
@@ -30,6 +30,7 @@
 #include "common.h"
 #include "plugin.h"
 #include "utils_parse_option.h"
+#include "utils_cmd_flush.h"
 
 int handle_flush (FILE *fh, char *buffer)
 {
index 8cbb9b2..4d679f0 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "utils_cache.h"
 #include "utils_parse_option.h"
+#include "utils_cmd_getval.h"
 
 #define print_to_socket(fh, ...) \
   do { \
index 530d153..145cd10 100644 (file)
@@ -29,6 +29,7 @@
 #include "plugin.h"
 
 #include "utils_parse_option.h"
+#include "utils_cmd_putnotif.h"
 
 #define print_to_socket(fh, ...) \
   do { \
index 7b0258c..43244f6 100644 (file)
@@ -29,6 +29,7 @@
 #include "plugin.h"
 
 #include "utils_parse_option.h"
+#include "utils_cmd_putval.h"
 
 #define print_to_socket(fh, ...) \
     do { \
index d2b8117..c7be9f0 100644 (file)
@@ -638,7 +638,7 @@ static int udb_result_create (const char *query_name, /* {{{ */
 /*
  * Query private functions
  */
-void udb_query_free_one (udb_query_t *q) /* {{{ */
+static void udb_query_free_one (udb_query_t *q) /* {{{ */
 {
   if (q == NULL)
     return;
index 12fc9b8..7a607e4 100644 (file)
  *   Florian Forster <ff at octo.it>
  **/
 
+#include <math.h>
+#include <limits.h>
+
 #include "collectd.h"
 #include "plugin.h"
 #include "utils_latency.h"
 #include "common.h"
 
-#include <math.h>
-#include <limits.h>
-
 #ifndef LLONG_MAX
 # define LLONG_MAX 9223372036854775807LL
 #endif
@@ -76,7 +76,7 @@ struct latency_counter_s
 * So, if the required bin width is 300, then new bin width will be 512 as it is
 * the next nearest power of 2.
 */
-void change_bin_width (latency_counter_t *lc, cdtime_t latency) /* {{{ */
+static void change_bin_width (latency_counter_t *lc, cdtime_t latency) /* {{{ */
 {
   /* This function is called because the new value is above histogram's range.
    * First find the required bin width:
@@ -117,7 +117,7 @@ void change_bin_width (latency_counter_t *lc, cdtime_t latency) /* {{{ */
       CDTIME_T_TO_DOUBLE (new_bin_width));
 } /* }}} void change_bin_width */
 
-latency_counter_t *latency_counter_create () /* {{{ */
+latency_counter_t *latency_counter_create (void) /* {{{ */
 {
   latency_counter_t *lc;
 
index 9930b72..2cfa71b 100644 (file)
@@ -30,7 +30,7 @@
 struct latency_counter_s;
 typedef struct latency_counter_s latency_counter_t;
 
-latency_counter_t *latency_counter_create ();
+latency_counter_t *latency_counter_create (void);
 void latency_counter_destroy (latency_counter_t *lc);
 
 void latency_counter_add (latency_counter_t *lc, cdtime_t latency);
index a423bb6..29f2acd 100644 (file)
@@ -48,7 +48,7 @@ static void cxmms_submit (const char *type, gauge_t value)
        plugin_dispatch_values (&vl);
 } /* void cxmms_submit */
 
-int cxmms_read (void)
+static int cxmms_read (void)
 {
   gint rate;
   gint freq;