erlang plugin: Hint towards epmd if erl_publish fails.
[collectd.git] / src / serial.c
index fb30fc4..cfa26bb 100644 (file)
@@ -40,11 +40,10 @@ static void serial_submit (const char *type_instance,
 
        vl.values = values;
        vl.values_len = 2;
-       vl.time = time (NULL);
-       strcpy (vl.host, hostname_g);
-       strcpy (vl.plugin, "serial");
-       strcpy (vl.type, "serial_octets");
-       strncpy (vl.type_instance, type_instance,
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "serial", sizeof (vl.plugin));
+       sstrncpy (vl.type, "serial_octets", sizeof (vl.type));
+       sstrncpy (vl.type_instance, type_instance,
                        sizeof (vl.type_instance));
 
        plugin_dispatch_values (&vl);