Imported Upstream version 0.8.0.4
[psensor-pkg-debian.git] / src / lib / cpu.c
index 66c6df9..7cf2105 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2012 jeanfi@gmail.com
+ * Copyright (C) 2010-2013 jeanfi@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -41,7 +41,7 @@ struct psensor *create_cpu_usage_sensor(int measures_len)
        label = strdup("cpu usage");
        type = SENSOR_TYPE_CPU_USAGE;
 
-       psensor = psensor_create(id, label, type, measures_len);
+       psensor = psensor_create(id, label, strdup("CPU"), type, measures_len);
 
        return psensor;
 }
@@ -93,7 +93,8 @@ void cpu_psensor_list_update(struct psensor **sensors)
        while (*ss) {
                s = *ss;
 
-               if (s->type == SENSOR_TYPE_CPU_USAGE)
+               if (!(s->type & SENSOR_TYPE_REMOTE)
+                   && s->type == SENSOR_TYPE_CPU_USAGE)
                        cpu_usage_sensor_update(s);
 
                ss++;