X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fload.c;h=491a985e432c1752a504f9f953808741c93ad76a;hb=98da2aa3ade7446863800c2f219d8a53fb2fbf6f;hp=bff629dcb06cb9ad6a1c2255c02d2fff65a9fd0a;hpb=db4535ae6cac033d869be59a148c25149bd8f80c;p=collectd.git diff --git a/src/load.c b/src/load.c index bff629dc..491a985e 100644 --- a/src/load.c +++ b/src/load.c @@ -4,8 +4,7 @@ * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. + * Free Software Foundation; only version 2 of the License is applicable. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -60,7 +59,7 @@ static data_set_t ds = static void load_submit (double snum, double mnum, double lnum) { value_t values[3]; - value_list_t vl; + value_list_t vl = VALUE_LIST_INIT; values[0].gauge = snum; values[1].gauge = mnum; @@ -68,7 +67,8 @@ static void load_submit (double snum, double mnum, double lnum) vl.values = values; vl.values_len = 3; - strcpy (vl.host, "localhost"); /* FIXME */ + vl.time = time (NULL); + strcpy (vl.host, hostname); strcpy (vl.plugin, "load"); strcpy (vl.plugin_instance, ""); strcpy (vl.type_instance, "");