X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fserial.c;h=cfa26bbd120b268cefea5d90669bd58917d3bb82;hb=9c98fa31ef50a6ff849d36cac4f5297faa6f7909;hp=9cfe1dd471b6ee1e195781617512a4ee16dd5d05;hpb=e4080f7aea79ffa3ad21fb2c8e6be311b1a404b9;p=collectd.git diff --git a/src/serial.c b/src/serial.c index 9cfe1dd4..cfa26bbd 100644 --- a/src/serial.c +++ b/src/serial.c @@ -40,13 +40,13 @@ static void serial_submit (const char *type_instance, vl.values = values; vl.values_len = 2; - vl.time = time (NULL); - strcpy (vl.host, hostname_g); - strcpy (vl.plugin, "serial"); - strncpy (vl.type_instance, type_instance, + sstrncpy (vl.host, hostname_g, sizeof (vl.host)); + sstrncpy (vl.plugin, "serial", sizeof (vl.plugin)); + sstrncpy (vl.type, "serial_octets", sizeof (vl.type)); + sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance)); - plugin_dispatch_values ("serial_octets", &vl); + plugin_dispatch_values (&vl); } static int serial_read (void)