configure.in: Check for `mysql_get_server_version' in libmyql.
[collectd.git] / src / multimeter.c
index 994747f..9c9c2c1 100644 (file)
@@ -86,7 +86,12 @@ static int multimeter_read_value(double *value)
                        struct timeval timeout;
                        struct timeval time_now;
 
-                       write(fd, "D", 1);
+                       status = swrite (fd, "D", 1);
+                       if (status < 0)
+                       {
+                               ERROR ("multimeter plugin: swrite failed.");
+                               return (-1);
+                       }
 
                        FD_ZERO(&rfds);
                        FD_SET(fd, &rfds);