Introduce two global variables: `hostname_g' and `interval_g'.
[collectd.git] / src / apcups.c
index 3060e18..e23bc9e 100644 (file)
@@ -423,7 +423,7 @@ static void apc_submit_generic (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, "apcups");
        strcpy (vl.plugin_instance, "");
        strncpy (vl.type_instance, type_inst, sizeof (vl.type_instance));