summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b158267)
raw | patch | inline | side by side (parent: b158267)
author | Florian Forster <octo@collectd.org> | |
Thu, 17 Dec 2015 13:21:27 +0000 (14:21 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 17 Dec 2015 13:22:29 +0000 (14:22 +0100) |
CID: 38112
src/gmond.c | patch | blob | history |
diff --git a/src/gmond.c b/src/gmond.c
index a1fa9ea4967285824eecb4a6f5e696ca94fc0938..99d1334bf8d29c35ea2cb1936b748c7b5a7cc98f 100644 (file)
--- a/src/gmond.c
+++ b/src/gmond.c
{
int yes = 1;
- setsockopt (sockets[sockets_num].fd, SOL_SOCKET, SO_REUSEADDR,
+ status = setsockopt (sockets[sockets_num].fd, SOL_SOCKET, SO_REUSEADDR,
(void *) &yes, sizeof (yes));
+ if (status != 0)
+ {
+ char errbuf[1024];
+ WARNING ("gmond plugin: setsockopt(2) failed: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
+ }
}
status = bind (sockets[sockets_num].fd, ai_ptr->ai_addr, ai_ptr->ai_addrlen);