X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnut.c;h=edc48c61510ab6e716abe17b52d222136ee7ceba;hb=61a1fa91ba73e4fe3a34949f77c5f017056f2b7a;hp=75504d408ef7e2f8bc4bce09dc128eb18fa246b8;hpb=5f9ec13b946733ff4e1edf2d8e3b7a22311dd894;p=collectd.git diff --git a/src/nut.c b/src/nut.c index 75504d40..edc48c61 100644 --- a/src/nut.c +++ b/src/nut.c @@ -123,13 +123,12 @@ static void nut_submit (nut_ups_t *ups, const char *type, vl.values = values; vl.values_len = STATIC_ARRAY_SIZE (values); - vl.time = time (NULL); sstrncpy (vl.host, (strcasecmp (ups->hostname, "localhost") == 0) ? hostname_g : ups->hostname, sizeof (vl.host)); - strcpy (vl.plugin, "nut"); + sstrncpy (vl.plugin, "nut", sizeof (vl.plugin)); sstrncpy (vl.plugin_instance, ups->upsname, sizeof (vl.plugin_instance)); sstrncpy (vl.type, type, sizeof (vl.type)); sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));