X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fusers.c;h=781e778734687b70ecbcbd24ffd73e1c6ff8545e;hp=4686443e4b25e3d31391bcf0d3a049aa2482c406;hb=633c3966f770e4d46651a2fe219a18d8a9907a9f;hpb=af46a5f31a0e8d4279d63d8ca9232dbd433dfb25 diff --git a/src/users.c b/src/users.c index 4686443e..781e7787 100644 --- a/src/users.c +++ b/src/users.c @@ -1,6 +1,9 @@ /** * collectd - src/users.c * Copyright (C) 2005-2007 Sebastian Harl + * Copyright (C) 2005 Niki W. Waibel + * Copyright (C) 2005-2007 Florian octo Forster + * Copyright (C) 2008 Oleg King * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -17,6 +20,9 @@ * * Authors: * Sebastian Harl + * Niki W. Waibel + * Florian octo Forster + * Oleg King **/ #include "collectd.h" @@ -48,11 +54,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)