From: Florian Forster Date: Sat, 22 Mar 2008 09:45:11 +0000 (+0100) Subject: wireless plugin: Fix reading the noise value. X-Git-Tag: collectd-4.2.6~10 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5a6dd55c7ce0d5426c402570bd787b65796439b0;p=collectd.git wireless plugin: Fix reading the noise value. Accidentally the wrong value was used as `noise'. This patch fixes it. Thanks to Ondřej Válek for pointing this out. --- diff --git a/src/wireless.c b/src/wireless.c index 48705989..285fb744 100644 --- 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);