Introduce two global variables: `hostname_g' and `interval_g'.
[collectd.git] / src / ntpd.c
index 366c24b..e4a230b 100644 (file)
@@ -326,7 +326,7 @@ static void ntpd_submit (char *type, char *type_inst, double value)
        vl.values = values;
        vl.values_len = 1;
        vl.time = time (NULL);
-       strcpy (vl.host, hostname);
+       strcpy (vl.host, hostname_g);
        strcpy (vl.plugin, "ntpd");
        strcpy (vl.plugin_instance, "");
        strncpy (vl.type_instance, type_inst, sizeof (vl.type_instance));