* library.c: Fixed compile. (defined names with - are invalid).

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6788 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2003-09-20 12:50:52 +00:00
parent d3c7ae7904
commit eaddbfd87b
2 changed files with 10 additions and 6 deletions

View File

@@ -1,3 +1,7 @@
2003-09-20 Marcus Meissner <marcus@jet.franken.de>
* library.c: Fixed compile. (defined names with - are invalid).
2003-09-19 Mariusz Woloszyn
* library.c: fixed capture imout and increased to 20 seconds; fixed
internal structures update when uploding files and creating

View File

@@ -49,8 +49,8 @@
#define GP_MODULE "PTP2"
#define USB-TIMEOUT 8000
#define USB-TIMEOUT-CAPTURE 20000
#define USB_TIMEOUT 8000
#define USB_TIMEOUT_CAPTURE 20000
#define CPR(context,result) {short r=(result); if (r!=PTP_RC_OK) {report_result ((context), r); return (translate_ptp_result (r));}}
@@ -516,7 +516,7 @@ camera_abilities (CameraAbilitiesList *list)
memset(&a,0, sizeof(a));
for (i = 0; models[i].model; i++) {
strcpy (a.model, models[i].model);
a.status = GP_DRIVER_STATUS_TESTING;
a.status = GP_DRIVER_STATUS_PRODUCTION;
a.port = GP_PORT_USB;
a.speed[0] = 0;
a.usb_vendor = models[i].usb_vendor;
@@ -642,7 +642,7 @@ camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path,
* few seconds. moving down the code. (kil3r)
*/
CPR(context,ptp_initiatecapture(&camera->pl->params, 0x00000000, 0x00000000));
CR (gp_port_set_timeout (camera->port, USB-TIMEOUT-CAPTURE));
CR (gp_port_set_timeout (camera->port, USB_TIMEOUT_CAPTURE));
while (ptp_usb_event_wait (&camera->pl->params, &event)!=PTP_RC_OK);
if (event.Code==PTP_EC_ObjectAdded) {
while (ptp_usb_event_wait (&camera->pl->params, &event)!=PTP_RC_OK);
@@ -650,7 +650,7 @@ camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path,
return GP_OK;
}
}
CR (gp_port_set_timeout (camera->port, USB-TIMEOUT));
CR (gp_port_set_timeout (camera->port, USB_TIMEOUT));
/* we're not going to set path, ptp does not use paths anyway ;) */
return GP_ERROR;
@@ -1309,7 +1309,7 @@ camera_init (Camera *camera, GPContext *context)
/* On large fiels (over 50M) deletion takes over 3 seconds,
* waiting for event after capture may take some time also
*/
CR (gp_port_set_timeout (camera->port, USB-TIMEOUT));
CR (gp_port_set_timeout (camera->port, USB_TIMEOUT));
/* do we configure port ???*/
#if 0
/* Configure the port */