projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4b660d
)
ted plugin: Don't expect a minimum length.
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Sat, 14 Mar 2009 17:49:52 +0000
(18:49 +0100)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Sat, 14 Mar 2009 17:49:52 +0000
(18:49 +0100)
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.
src/ted.c
patch
|
blob
|
history
diff --git
a/src/ted.c
b/src/ted.c
index
57c8889
..
d2a73a5
100644
(file)
--- 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