From 74ba80a065e322212a05b3ffcf09f7c1c52fa5ff Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 27 Feb 2009 17:51:48 +0000 Subject: [PATCH] set timeout for viewfinderon to regular (5 secs) git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11832 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/ptp2/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index b522766f5..b05f916ed 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -134,12 +134,14 @@ camera_prepare_canon_powershot_capture(Camera *camera, GPContext *context) { event.length,event.type,event.code,event.trans_id, event.param1, event.param2, event.param3); } + gp_port_set_timeout (camera->port, oldtimeout); if (ptp_operation_issupported(params, PTP_OC_CANON_ViewfinderOn)) { ret = ptp_canon_viewfinderon (params); if (ret != PTP_RC_OK) gp_log (GP_LOG_ERROR, "ptp", _("Canon enable viewfinder failed: %d"), ret); /* ignore errors here */ } + gp_port_set_timeout (camera->port, 1000); /* Catch event, attempt 2 */ if (val16!=PTP_RC_OK) { if (PTP_RC_OK==params->event_wait (params, &evc)) {