Delete some remaining debug printout
[libftdi] / src / ftdi_stream.c
index 076ebd4..6c40327 100644 (file)
@@ -153,7 +153,6 @@ ftdi_readstream(struct ftdi_context *ftdi,
     int xferIndex;
     int err = 0;
     
-    fprintf(stderr, "ftdi_readstream\n");
     /*
      * Set up all transfers
      */
@@ -198,7 +197,7 @@ ftdi_readstream(struct ftdi_context *ftdi,
      */
     if (ftdi_set_bitmode(ftdi,  0xff, BITMODE_SYNCFF) < 0)
     {
-        fprintf(stderr,"Can't set synchronous fifo mode\n",
+        fprintf(stderr,"Can't set synchronous fifo mode: %s\n",
                 ftdi_get_error_string(ftdi));
         goto cleanup;
     }
@@ -216,10 +215,10 @@ ftdi_readstream(struct ftdi_context *ftdi,
         struct timeval timeout = { 0, ftdi->usb_read_timeout };
         struct timeval now;
         
-        int err = libusb_handle_events_timeout(NULL, &timeout);
+        int err = libusb_handle_events_timeout(ftdi->usb_ctx, &timeout);
         if (err ==  LIBUSB_ERROR_INTERRUPTED)
             /* restart interrupted events */
-            err = libusb_handle_events_timeout(NULL, &timeout);  
+            err = libusb_handle_events_timeout(ftdi->usb_ctx, &timeout);  
         if (!state.result)
         {
             state.result = err;