Let plugin_dispatch_values() set value_list.time in case of 'now'.
[collectd.git] / src / users.c
index 5b12e98..b605ff8 100644 (file)
@@ -48,10 +48,9 @@ static void users_submit (gauge_t value)
 
        vl.values = values;
        vl.values_len = 1;
-       vl.time = time (NULL);
-       strcpy (vl.host, hostname_g);
-       strcpy (vl.plugin, "users");
-       strcpy (vl.type, "users");
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "users", sizeof (vl.plugin));
+       sstrncpy (vl.type, "users", sizeof (vl.plugin));
 
        plugin_dispatch_values (&vl);
 } /* void users_submit */