Replaced all hardcoded heartbeat values (== 25 seconds) with `COLLECTD_HEARTBEAT'.
[collectd.git] / src / hddtemp.c
index bea7edf..5d79bf4 100644 (file)
 #include <netinet/tcp.h>
 #include <libgen.h> /* for basename */
 
-#if 0
-/* LOCALHOST_ADDR
-   The ip address 127.0.0.1, as a 32 bit. */
-#define LOCALHOST_ADDR 0x7F000001
-
-/* HDDTEMP_PORT
-   The tcp port the hddtemp daemon is listening on. */
-#define HDDTEMP_PORT 7634
-#endif
-
 #define HDDTEMP_DEF_HOST "127.0.0.1"
 #define HDDTEMP_DEF_PORT "7634"
 
@@ -55,7 +45,7 @@ static char *filename_format = "hddtemp-%s.rrd";
 
 static char *ds_def[] =
 {
-       "DS:value:GAUGE:25:U:U",
+       "DS:value:GAUGE:"COLLECTD_HEARTBEAT":U:U",
        NULL
 };
 static int ds_num = 1;
@@ -101,6 +91,7 @@ static char *hddtemp_port = NULL;
  *
  * FIXME:
  *  we need to create a new socket each time. Is there another way?
+ *  Hm, maybe we can re-use the `sockaddr' structure? -octo
  */
 static int hddtemp_query_daemon (char *buffer, int buffer_size)
 {