projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2eb2881
)
wireless plugin: Fix reading the noise value.
author
Florian Forster
<octo@huhu.verplant.org>
Sat, 22 Mar 2008 09:45:11 +0000
(10:45 +0100)
committer
Florian Forster
<octo@huhu.verplant.org>
Sat, 22 Mar 2008 09:45:11 +0000
(10:45 +0100)
Accidentally the wrong value was used as `noise'. This patch fixes it.
Thanks to Ondřej Válek for pointing this out.
src/wireless.c
patch
|
blob
|
history
diff --git
a/src/wireless.c
b/src/wireless.c
index
4870598
..
285fb74
100644
(file)
--- a/
src/wireless.c
+++ b/
src/wireless.c
@@
-132,8
+132,8
@@
static int wireless_read (void)
power = 1.0; /* invalid */
/* noise [dBm] < 0.0 */
- noise = strtod (fields[
3
], &endptr);
- if (fields[
3
] == endptr)
+ noise = strtod (fields[
4
], &endptr);
+ if (fields[
4
] == endptr)
noise = 1.0; /* invalid */
else if ((noise >= 0.0) && (noise <= 100.0))
noise = wireless_percent_to_power (noise);