From: <mar...@us...> - 2013-05-26 19:32:16
|
Revision: 14431 http://sourceforge.net/p/gphoto/code/14431 Author: marcusmeissner Date: 2013-05-26 19:32:13 +0000 (Sun, 26 May 2013) Log Message: ----------- use correct error checking on devicebusy Modified Paths: -------------- trunk/libgphoto2/camlibs/ptp2/library.c Modified: trunk/libgphoto2/camlibs/ptp2/library.c =================================================================== --- trunk/libgphoto2/camlibs/ptp2/library.c 2013-05-26 19:17:29 UTC (rev 14430) +++ trunk/libgphoto2/camlibs/ptp2/library.c 2013-05-26 19:32:13 UTC (rev 14431) @@ -2091,8 +2091,16 @@ SET_CONTEXT_P(params, NULL); return translate_ptp_result (ret); } - while (ptp_nikon_device_ready(params) != PTP_RC_OK) + do { + ret = ptp_nikon_device_ready(params); usleep(20*1000); + } while (ret == PTP_RC_DeviceBusy); + + if (ret != PTP_RC_OK) { + gp_context_error (context, _("Nikon enable liveview failed: %x"), ret); + SET_CONTEXT_P(params, NULL); + return translate_ptp_result (ret); + } } tries = 20; while (tries--) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |