The branch, master has been updated
via 3094872b920e3b469a6f088f17d2ba5fb6f9804a (commit)
from 9162183d5e2ebffea6a41a1a96c9c970bc838ac5 (commit)
- Log -----------------------------------------------------------------
commit 3094872b920e3b469a6f088f17d2ba5fb6f9804a
Author: Hermann Kraus <herm@xxxxxxxxxxxx>
Date: Wed Aug 18 09:36:29 2010 +0200
Return correct size if there's enough data in the read buffer
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.
-----------------------------------------------------------------------
Summary of changes:
src/ftdi.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/ftdi.c b/src/ftdi.c
index bbbeb9a..f64301d 100644
--- 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);
hooks/post-receive
--
A library to talk to FTDI chips
--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|