summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2004f54)
raw | patch | inline | side by side (parent: 2004f54)
author | Florian Forster <octo@huhu.verplant.org> | |
Thu, 12 Jun 2008 08:23:49 +0000 (10:23 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 12 Jun 2008 08:23:49 +0000 (10:23 +0200) |
src/thermal.c | patch | blob | history |
diff --git a/src/thermal.c b/src/thermal.c
index a6ebe4eb02780bcf2649640d58b4cc3f8b347a42..f7f2a59d5eb1521f628a9d518daef6f34f0ee03a 100644 (file)
--- a/src/thermal.c
+++ b/src/thermal.c
COOLING_DEV
};
-static void thermal_submit (const char *plugin_instance, enum dev_type dt, double value)
+static void thermal_submit (const char *plugin_instance, enum dev_type dt,
+ gauge_t value)
{
- value_list_t vl = dt == TEMP ? vl_temp_template : vl_state_template;
+ value_list_t vl = (dt == TEMP) ? vl_temp_template : vl_state_template;
value_t vt;
vt.gauge = value;
vl.values = &vt;
vl.time = time (NULL);
- sstrncpy (vl.plugin_instance, plugin_instance, sizeof(vl.plugin_instance));
+ sstrncpy (vl.plugin, "thermal", sizeof(vl.plugin));
+ sstrncpy (vl.plugin_instance, plugin_instance,
+ sizeof(vl.plugin_instance));
+ sstrncpy (vl.type, (dt == TEMP) ? "temperature" : "gauge",
+ sizeof (vl.type));
- plugin_dispatch_values (dt == TEMP ? "temperature" : "gauge", &vl);
+ plugin_dispatch_values (&vl);
}
static int read_file_contents (const char *filename, char *buf, int bufsize)