projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
email plugin: Use a thread pool.
[collectd.git]
/
src
/
hddtemp.c
diff --git
a/src/hddtemp.c
b/src/hddtemp.c
index
cbe6e80
..
80b3419
100644
(file)
--- a/
src/hddtemp.c
+++ b/
src/hddtemp.c
@@
-158,6
+158,10
@@
static int hddtemp_query_daemon (char *buffer, int buffer_size)
fd = -1;
continue;
}
fd = -1;
continue;
}
+
+ /* A socket could be opened and connecting succeeded. We're
+ * done. */
+ break;
}
freeaddrinfo (ai_list);
}
freeaddrinfo (ai_list);
@@
-181,6
+185,7
@@
static int hddtemp_query_daemon (char *buffer, int buffer_size)
syslog (LOG_ERR, "hddtemp: Error reading from socket: %s",
strerror (errno));
syslog (LOG_ERR, "hddtemp: Error reading from socket: %s",
strerror (errno));
+ close (fd);
return (-1);
}
buffer_fill += status;
return (-1);
}
buffer_fill += status;
@@
-369,6
+374,7
@@
static void hddtemp_init (void)
first_hddname = entry;
}
}
first_hddname = entry;
}
}
+ fclose (fh);
}
else
DBG ("Could not open /proc/partitions: %s",
}
else
DBG ("Could not open /proc/partitions: %s",