Fix file size problems
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@7099 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2004-02-03 Hans Ulrich Niedermann <gp@n-dimensional.de>
|
||||
|
||||
* usb.c: Use largest file size limit
|
||||
* canon.c, canon.h: Note improper use of file size limits
|
||||
|
||||
2004-01-31 Marcus Meissner <marcus@jet.franken.de>
|
||||
|
||||
* canon.c, canon.h: Richard Simpson <richard@huskydog.org.uk>
|
||||
|
||||
@@ -83,6 +83,8 @@
|
||||
* detection.
|
||||
* - Newer Canon USB cameras also support a PTP mode. See ptp2 camlib.
|
||||
* - No IEEE1394 cameras supported yet.
|
||||
* - The size limit constants aren't used properly anywhere. We should
|
||||
* probably get rid of them altogether.
|
||||
**/
|
||||
|
||||
/* SL_* - size limit constants */
|
||||
|
||||
@@ -258,6 +258,7 @@ struct canonCamModelData
|
||||
unsigned short usb_vendor;
|
||||
unsigned short usb_product;
|
||||
canonCaptureSupport usb_capture_support;
|
||||
/* these three constants aren't used properly */
|
||||
unsigned int max_movie_size;
|
||||
unsigned int max_thumbnail_size;
|
||||
unsigned int max_picture_size;
|
||||
|
||||
@@ -1058,7 +1058,7 @@ canon_serial_get_file (Camera *camera, const char *name, int *length, GPContext
|
||||
if (!file) {
|
||||
total = le32atoh (msg + 4);
|
||||
|
||||
if (total > camera->pl->md->max_picture_size) {
|
||||
if (total > camera->pl->md->max_movie_size) {
|
||||
GP_DEBUG ("ERROR: %d is too big\n", total);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1178,7 +1178,7 @@ canon_usb_get_file (Camera *camera, const char *name, unsigned char **data, int
|
||||
|
||||
/* the 1 is to show status */
|
||||
res = canon_usb_long_dialogue (camera, CANON_USB_FUNCTION_GET_FILE, data, length,
|
||||
camera->pl->md->max_picture_size, payload,
|
||||
camera->pl->md->max_movie_size, max_file_size, payload,
|
||||
payload_length, 1, context);
|
||||
if (res != GP_OK) {
|
||||
GP_DEBUG ("canon_usb_get_file: canon_usb_long_dialogue() "
|
||||
|
||||
Reference in New Issue
Block a user