Merge branch 'master' of /var/lib/git/collectd
authorFlorian Forster <octo@huhu.verplant.org>
Thu, 12 Jun 2008 08:24:10 +0000 (10:24 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Thu, 12 Jun 2008 08:24:10 +0000 (10:24 +0200)
1  2 
src/thermal.c

diff --combined src/thermal.c
@@@ -1,6 -1,6 +1,6 @@@
  /**
   * collectd - src/thermal.c
-  * Copyright (C) 2008  Micha³ Miros³aw
+  * Copyright (C) 2008  Michał Mirosław
   *
   * 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
@@@ -16,7 -16,7 +16,7 @@@
   * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
   *
   * Authors:
-  *   Micha³ Miros³aw <mirq-linux at rere.qmqm.pl>
+  *   Michał Mirosław <mirq-linux at rere.qmqm.pl>
   **/
  
  #include "collectd.h"
@@@ -42,23 -42,18 +42,23 @@@ enum dev_type 
        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)