From: Florian Forster Date: Sat, 14 Mar 2009 17:49:52 +0000 (+0100) Subject: ted plugin: Don't expect a minimum length. X-Git-Tag: collectd-4.7.0~68^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2b475288859e894785e20775a6c8d7b9b95c881c;p=collectd.git ted plugin: Don't expect a minimum length. The serial interface apparently can only deliver 255 bytes at once, so checking if we received ``enough'' (i. e. 278+x) bytes will never work. --- diff --git a/src/ted.c b/src/ted.c index 57c88898..d2a73a53 100644 --- a/src/ted.c +++ b/src/ted.c @@ -154,13 +154,6 @@ static int ted_read_value(double *ret_power, double *ret_voltage) receive_buffer_length); return (-1); } - else if (receive_buffer_length < EXPECTED_PACKAGE_LENGTH) - { - WARNING ("ted plugin: read(2) returned %zi bytes, " - "but at least %i are necessary for a valid packet.", - receive_buffer_length, EXPECTED_PACKAGE_LENGTH); - return (-1); - } /* * packet filter loop