Altered interrupt read in canon_usb_camera_init(), since A60 seems to send
2 8-byte messages instead of one 16-byte message. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6455 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -212,9 +212,12 @@ canon_usb_camera_init (Camera *camera, GPContext *context)
|
||||
"Step #4.2 of initialization failed! (returned %i, expected %i) "
|
||||
"Camera might still work though. Continuing.", i, 4);
|
||||
|
||||
read_bytes = 0;
|
||||
do {
|
||||
i = gp_port_check_int_fast ( camera->port, buffer, 0x10 );
|
||||
} while ( i < 0x10 && i >= 0 );
|
||||
if ( i > 0 )
|
||||
read_bytes += i;
|
||||
} while ( read_bytes < 0x10 && i >= 0 );
|
||||
if ( i != 0x10 ) {
|
||||
GP_DEBUG ( "canon_usb_camera_init() interrupt read failed, status=%d", i );
|
||||
return GP_ERROR_CORRUPTED_DATA;
|
||||
|
||||
Reference in New Issue
Block a user