projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.7'
[collectd.git]
/
src
/
write_riemann.c
diff --git
a/src/write_riemann.c
b/src/write_riemann.c
index
5282b1d
..
a51b4b5
100644
(file)
--- a/
src/write_riemann.c
+++ b/
src/write_riemann.c
@@
-31,13
+31,11
@@
#include "collectd.h"
#include "common.h"
#include "collectd.h"
#include "common.h"
-#include "configfile.h"
#include "plugin.h"
#include "utils_cache.h"
#include "utils_complain.h"
#include "write_riemann_threshold.h"
#include "plugin.h"
#include "utils_cache.h"
#include "utils_complain.h"
#include "write_riemann_threshold.h"
-#include <errno.h>
#include <riemann/riemann-client.h>
#define RIEMANN_HOST "localhost"
#include <riemann/riemann-client.h>
#define RIEMANN_HOST "localhost"
@@
-614,7
+612,6
@@
static int wrr_config_node(oconfig_item_t *ci) /* {{{ */
int i;
oconfig_item_t *child;
char callback_name[DATA_MAX_NAME_LEN];
int i;
oconfig_item_t *child;
char callback_name[DATA_MAX_NAME_LEN];
- user_data_t ud;
if ((host = calloc(1, sizeof(*host))) == NULL) {
ERROR("write_riemann plugin: calloc failed.");
if ((host = calloc(1, sizeof(*host))) == NULL) {
ERROR("write_riemann plugin: calloc failed.");
@@
-688,7
+685,8
@@
static int wrr_config_node(oconfig_item_t *ci) /* {{{ */
if (status != 0)
break;
#else
if (status != 0)
break;
#else
- WARNING("write_riemann plugin: The Timeout option is not supported. Please upgrade the Riemann client to at least 1.8.0.");
+ WARNING("write_riemann plugin: The Timeout option is not supported. "
+ "Please upgrade the Riemann client to at least 1.8.0.");
#endif
} else if (strcasecmp("Port", child->key) == 0) {
host->port = cf_util_get_port_number(child);
#endif
} else if (strcasecmp("Port", child->key) == 0) {
host->port = cf_util_get_port_number(child);
@@
-796,8
+794,8
@@
static int wrr_config_node(oconfig_item_t *ci) /* {{{ */
ssnprintf(callback_name, sizeof(callback_name), "write_riemann/%s",
host->name);
ssnprintf(callback_name, sizeof(callback_name), "write_riemann/%s",
host->name);
- ud.data = host;
- u
d.free_func = wrr_free
;
+
+ u
ser_data_t ud = {.data = host, .free_func = wrr_free}
;
pthread_mutex_lock(&host->lock);
pthread_mutex_lock(&host->lock);
@@
-897,5
+895,3
@@
static int wrr_config(oconfig_item_t *ci) /* {{{ */
void module_register(void) {
plugin_register_complex_config("write_riemann", wrr_config);
}
void module_register(void) {
plugin_register_complex_config("write_riemann", wrr_config);
}
-
-/* vim: set sw=8 sts=8 ts=8 noet : */