The branch, eeprom-new has been updated
       via  dc09eaa8d384f8c31fe3015d104e5b3bdd8db009 (commit)
      from  d4afae5f9625fa08d801715b0a21faaa52ecf83c (commit)


- Log -----------------------------------------------------------------
commit dc09eaa8d384f8c31fe3015d104e5b3bdd8db009
Author: Thomas Jarosch <[email protected]>
Date:   Fri May 6 15:17:13 2011 +0200

    Correct ftdi_poll_modem_status() result code

-----------------------------------------------------------------------

Summary of changes:
 AUTHORS    |    1 +
 src/ftdi.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index f8463e4..d96a319 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -37,6 +37,7 @@ see Changelog for full details:
   Thimo Eichstaedt <[email protected]>
   Thomas Fischl <[email protected]>
   Tim Ansell <[email protected]>
+  Tom Saunders <[email protected]>
   Uwe Bonnes <[email protected]>
   Wilfried Holzke <[email protected]>
   Yi-Shin Li <[email protected]>
diff --git a/src/ftdi.c b/src/ftdi.c
index c7856a4..c53d7aa 100644
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -1984,7 +1984,7 @@ int ftdi_poll_modem_status(struct ftdi_context *ftdi, 
unsigned short *status)
     if (libusb_control_transfer(ftdi->usb_dev, FTDI_DEVICE_IN_REQTYPE, 
SIO_POLL_MODEM_STATUS_REQUEST, 0, ftdi->index, (unsigned char *)usb_val, 2, 
ftdi->usb_read_timeout) != 2)
         ftdi_error_return(-1, "getting modem status failed");
 
-    *status = (usb_val[1] << 8) | usb_val[0];
+    *status = (usb_val[1] << 8) | (usb_val[0] & 0xFF);
 
     return 0;
 }


hooks/post-receive
-- 
port libftdi to libusb-1.0

--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [email protected]   

Reply via email to