X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fusers.c;h=b605ff84c9d7ab98cfb8abbd762b8d30207882fe;hb=bc7992ed0693313a2b1fe282a5bf23f1cc9f8e42;hp=4686443e4b25e3d31391bcf0d3a049aa2482c406;hpb=c60c6dfa5960b23bdc59341ae73e701dd59d4305;p=collectd.git diff --git a/src/users.c b/src/users.c index 4686443e..b605ff84 100644 --- a/src/users.c +++ b/src/users.c @@ -48,11 +48,11 @@ 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"); + 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 ("users", &vl); + plugin_dispatch_values (&vl); } /* void users_submit */ static int users_read (void)