|
From: Joe C. <ma...@jo...> - 2005-11-29 01:06:20
|
I'm using libusb 0.1.8 on CentOS 4.2, so maybe this is fixed already,
but with the following code snippet:
8<-----------------------------
ret = usb_bulk_read(udev, 0x86, Buffer, BufferSize, REQUEST_TIMEOUT);
if (ret < 0)
{
write_camera_log(WC_ERROR, "usb_bulk_read error %d\n", ret);
write_camera_log(WC_ERROR, "usb_error_type %d\n", usb_error_type);
write_camera_log(WC_ERROR, "errors: %s\n", usb_strerror());
8<-----------------------------
I get the following output from my usb device occasionally:
8<-----------------------------
usb_bulk_read error -110
usb_error_type 0
errors: No error
8<-----------------------------
I was looking through the libusb 0.1.8 source, and for the life of me I
just can't see how usb_error_type could not get set (nor how
usb_strerror() could return "No error") when usb_bulk_read() returns a -110.
Am I doing something obviously wrong here (I know I haven't given much
detail -- I can provide more if needed)?
Also, I take it that a return value of -110 means the error is ETIMEDOUT
-- is that correct?
Thanks,
Joe
|