git://developer.intra2net.com
/
libftdi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
9162183
)
Return correct size if there's enough data in the read buffer
author
Hermann Kraus
<herm@scribus.info>
Wed, 18 Aug 2010 07:36:29 +0000 (09:36 +0200)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Wed, 18 Aug 2010 07:36:29 +0000 (09:36 +0200)
From the mailinglist:
The current git version of libftdi contains a critical bug in
ftdi_read_data. If a read from the device returns more data than requested
the function exits with error -127 (documented as "// never reached")
instead of a correct return code.
src/ftdi.c
patch
|
blob
|
blame
|
history
diff --git
a/src/ftdi.c
b/src/ftdi.c
index
bbbeb9a
..
f64301d
100644
(file)
--- a/
src/ftdi.c
+++ b/
src/ftdi.c
@@
-1655,6
+1655,7
@@
int ftdi_read_data(struct ftdi_context *ftdi, unsigned char *buf, int size)
/* printf("Returning part: %d - size: %d - offset: %d - ret: %d - remaining: %d\n",
part_size, size, offset, ret, ftdi->readbuffer_remaining); */
+ return offset;
}
}
gettimeofday(&tv_current,NULL);