summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0ea11b5)
raw | patch | inline | side by side (parent: 0ea11b5)
author | Florian Forster <octo@collectd.org> | |
Thu, 17 Dec 2015 13:18:59 +0000 (14:18 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 17 Dec 2015 13:22:33 +0000 (14:22 +0100) |
CID: 38113
src/gmond.c | patch | blob | history |
diff --git a/src/gmond.c b/src/gmond.c
index 99d1334bf8d29c35ea2cb1936b748c7b5a7cc98f..629a9ad2409b5982ddf265956abebef2464ea446 100644 (file)
--- a/src/gmond.c
+++ b/src/gmond.c
pthread_mutex_lock (&mc_send_sockets_lock);
for (i = 0; i < mc_send_sockets_num; i++)
- sendto (mc_send_sockets[i].fd, buffer, (size_t) buffer_size,
+ {
+ ssize_t status = sendto (mc_send_sockets[i].fd, buffer, (size_t) buffer_size,
/* flags = */ 0,
(struct sockaddr *) &mc_send_sockets[i].addr,
mc_send_sockets[i].addrlen);
+ if (status == -1)
+ {
+ char errbuf[1024];
+ ERROR ("gmond plugin: sendto(2) failed: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
+ continue;
+ }
+ }
pthread_mutex_unlock (&mc_send_sockets_lock);
sfree (msg.Ganglia_metadata_msg_u.grequest.metric_id.host);