X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnut.c;h=edc48c61510ab6e716abe17b52d222136ee7ceba;hb=8eb9e6285f394569d7fe6ad43a0f4e5f9bca454f;hp=75504d408ef7e2f8bc4bce09dc128eb18fa246b8;hpb=6b49eec15d421a74935fb1165c3e9fdb80ca838e;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));