X-Git-Url: http://wpitchoune.net/gitweb/?p=psensor-pkg-debian.git;a=blobdiff_plain;f=src%2Flib%2Fcpu.c;fp=src%2Flib%2Fcpu.c;h=7cf2105ac0d5af8262d54f8ac04c674b404310a6;hp=66c6df92380c57ae5d98f3633d1a5ea838c441d7;hb=dcd813f21c83592155f712ff1acf450b483d8072;hpb=f055e7507526592d3a74c652f5f053701614c9c0 diff --git a/src/lib/cpu.c b/src/lib/cpu.c index 66c6df9..7cf2105 100644 --- a/src/lib/cpu.c +++ b/src/lib/cpu.c @@ -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++;