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.5'
[collectd.git]
/
src
/
write_riemann.c
diff --git
a/src/write_riemann.c
b/src/write_riemann.c
index
a67f94c
..
73d202c
100644
(file)
--- a/
src/write_riemann.c
+++ b/
src/write_riemann.c
@@
-33,7
+33,6
@@
#include "utils_cache.h"
#include "riemann.pb-c.h"
#include "utils_cache.h"
#include "riemann.pb-c.h"
-#include <sys/socket.h>
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
@@
-619,7
+618,7
@@
static Msg *riemann_value_list_to_protobuf (struct riemann_host const *host, /*
msg__init (msg);
/* Set up events. First, the list of pointers. */
msg__init (msg);
/* Set up events. First, the list of pointers. */
- msg->n_events =
(size_t)
vl->values_len;
+ msg->n_events = vl->values_len;
msg->events = calloc (msg->n_events, sizeof (*msg->events));
if (msg->events == NULL)
{
msg->events = calloc (msg->n_events, sizeof (*msg->events));
if (msg->events == NULL)
{
@@
-789,6
+788,8
@@
static int riemann_write(const data_set_t *ds, /* {{{ */
status = write_riemann_threshold_check(ds, vl, statuses);
if (status != 0)
return status;
status = write_riemann_threshold_check(ds, vl, statuses);
if (status != 0)
return status;
+ } else {
+ memset (statuses, 0, sizeof (statuses));
}
if (host->use_tcp == 1 && host->batch_mode) {
}
if (host->use_tcp == 1 && host->batch_mode) {