X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftape.c;h=a8e7dc45faab08bdf18ffd42fbebd242f3f3477f;hb=da658a37ddd9421752903c4ff5f2aa83320387c5;hp=c374d59820e6dd1d7bc93083d831081594f2dec8;hpb=2354eda94fa44c8bcb8e39b24b117e7937110224;p=collectd.git diff --git a/src/tape.c b/src/tape.c index c374d598..a8e7dc45 100644 --- a/src/tape.c +++ b/src/tape.c @@ -58,22 +58,21 @@ static int tape_init (void) static void tape_submit (const char *plugin_instance, const char *type, - counter_t read, counter_t write) + derive_t read, derive_t write) { value_t values[2]; value_list_t vl = VALUE_LIST_INIT; - values[0].counter = read; - values[1].counter = write; + values[0].derive = read; + values[1].derive = write; vl.values = values; vl.values_len = 2; - vl.time = time (NULL); - strcpy (vl.host, hostname_g); - strcpy (vl.plugin, "tape"); - strncpy (vl.plugin_instance, plugin_instance, + sstrncpy (vl.host, hostname_g, sizeof (vl.host)); + sstrncpy (vl.plugin, "tape", sizeof (vl.plugin)); + sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance)); - strncpy (vl.type, type, sizeof (vl.type)); + sstrncpy (vl.type, type, sizeof (vl.type)); plugin_dispatch_values (&vl); } /* void tape_submit */