X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=inline;f=src%2Fserial.c;h=430082220595c58f2b927089871a76e4e482a157;hb=b87c57591e40b3d9cd86c0a382818acc78558d96;hp=4f08a346eb542fee24e84d3f4918fcc73552a4fb;hpb=7746d34c8ecc4fa984187cf2b1a93d1b6d3a061b;p=collectd.git diff --git a/src/serial.c b/src/serial.c index 4f08a346..43008222 100644 --- a/src/serial.c +++ b/src/serial.c @@ -18,7 +18,7 @@ * * Authors: * David Bacher - * Florian octo Forster + * Florian octo Forster **/ #include "collectd.h" @@ -30,23 +30,23 @@ #endif static void serial_submit (const char *type_instance, - counter_t rx, counter_t tx) + derive_t rx, derive_t tx) { value_t values[2]; value_list_t vl = VALUE_LIST_INIT; - values[0].counter = rx; - values[1].counter = tx; + values[0].derive = rx; + values[1].derive = tx; vl.values = values; vl.values_len = 2; - vl.time = time (NULL); sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "serial", sizeof (vl.plugin)); - strncpy (vl.type_instance, type_instance, + 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) @@ -54,8 +54,8 @@ static int serial_read (void) FILE *fh; char buffer[1024]; - counter_t rx = 0; - counter_t tx = 0; + derive_t rx = 0; + derive_t tx = 0; char *fields[16]; int i, numfields;