summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c33db57)
raw | patch | inline | side by side (parent: c33db57)
author | Florian Forster <octo@collectd.org> | |
Thu, 18 Jun 2015 07:16:18 +0000 (09:16 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 18 Jun 2015 08:26:13 +0000 (10:26 +0200) |
src/powerdns.c | patch | blob | history |
diff --git a/src/powerdns.c b/src/powerdns.c
index 81e253bf44f34c778fc55752c06904acde649b7b..11974aaafdcb2122ad31f8c5d42bc9a81cfed645 100644 (file)
--- a/src/powerdns.c
+++ b/src/powerdns.c
timeout.tv_sec=5;
timeout.tv_usec=0;
status = setsockopt (sd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof (timeout));
+ if (status != 0)
+ {
+ FUNC_ERROR ("setsockopt");
+ close (sd);
+ return (-1);
+ }
status = connect (sd, (struct sockaddr *) &item->sockaddr,
sizeof (item->sockaddr));
buffer[buffer_size] = 0;
} /* while (42) */
close (sd);
- sd = -1;
if (status < 0)
{