From 29b1dfd985a87af8d51034212284f684eb35bc48 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 22 Jun 2010 19:42:11 -0400 Subject: [PATCH] fix build failure in libusb_context change Current git tree build fails: ftdi.c: In function 'ftdi_transfer_data_done': ftdi.c:1513:36: error: 'ftdi' undeclared (first use in this function) This function has a ftdi_transfer_control tc, not a ftdi_context ftdi. Probably want to squash this into commit: 02212d8e84cccd393a95612d4c4a5ec495fa3e2e Store and use the libusb_context Signed-off-by: Mike Frysinger --- src/ftdi.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ftdi.c b/src/ftdi.c index 167810b..9b20c37 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -1510,14 +1510,14 @@ int ftdi_transfer_data_done(struct ftdi_transfer_control *tc) while (!tc->completed) { - ret = libusb_handle_events(ftdi->usb_ctx); + ret = libusb_handle_events(tc->ftdi->usb_ctx); if (ret < 0) { if (ret == LIBUSB_ERROR_INTERRUPTED) continue; libusb_cancel_transfer(tc->transfer); while (!tc->completed) - if (libusb_handle_events(ftdi->usb_ctx) < 0) + if (libusb_handle_events(tc->ftdi->usb_ctx) < 0) break; libusb_free_transfer(tc->transfer); free (tc); -- 1.7.1