diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2017-05-12 08:30:34 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2017-05-12 08:30:34 +0200 |
commit | e70c2f52b2d3bd73df2aa16352f5e79219cf8c04 (patch) | |
tree | 62510ba14fd5f3a9c4e23ba60cea913274cfe02f | |
parent | 124b48db81a740eae26f1be25ab83b3cbbc90032 (diff) | |
download | libgphoto2-e70c2f52b2d3bd73df2aa16352f5e79219cf8c04.tar.gz |
reenable the objecthandles logic, as reportedly only the
first ObjhectAdded event is received
https://github.com/gphoto/libgphoto2/issues/133
-rw-r--r-- | camlibs/ptp2/library.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index f76fb58e9..e6b200a40 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -3929,10 +3929,8 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat { PTPParams *params = &camera->pl->params; PTPPropertyValue propval; -#if 0 PTPObjectHandles handles, beforehandles; int tries; -#endif PTPContainer event; uint32_t newobject; struct timeval event_start; @@ -3940,9 +3938,7 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat GP_LOG_D ("camera_fuji_capture"); -#if 0 C_PTP (ptp_getobjecthandles (params, PTP_HANDLER_SPECIAL, 0x000000, 0x000000, &beforehandles)); -#endif /* focus */ propval.u16 = 0x0200; @@ -3983,12 +3979,8 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat break; } } - } while (waiting_for_timeout (&back_off_wait, event_start, 2000)); /* wait for 2 more seconds after busy is no longer signaled */ + } while (waiting_for_timeout (&back_off_wait, event_start, 500)); /* wait for 0.5 seconds after busy is no longer signaled */ - return GP_ERROR; - - -#if 0 /* If we got no event in 2 seconds duplicate the nikon broken capture, as we do not know how to get events yet */ tries = 5; @@ -4036,7 +4028,6 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat free (beforehandles.Handler); if (!newobject) GP_LOG_D ("fuji object added no new file found after 5 seconds?!?"); -#endif downloadfile: /* clear path, so we get defined results even without object info */ |