From: <mar...@us...> - 2013-06-30 11:13:36
|
Revision: 14478 http://sourceforge.net/p/gphoto/code/14478 Author: marcusmeissner Date: 2013-06-30 11:13:27 +0000 (Sun, 30 Jun 2013) Log Message: ----------- handle return values from select Modified Paths: -------------- trunk/libgphoto2/camlibs/ptp2/ptpip.c Modified: trunk/libgphoto2/camlibs/ptp2/ptpip.c =================================================================== --- trunk/libgphoto2/camlibs/ptp2/ptpip.c 2013-06-30 08:44:09 UTC (rev 14477) +++ trunk/libgphoto2/camlibs/ptp2/ptpip.c 2013-06-30 11:13:27 UTC (rev 14478) @@ -544,8 +544,14 @@ else timeout.tv_usec = 1000; /* 1/1000 second .. perhaps wait longer? */ - if (1 != select (params->evtfd+1, &infds, NULL, NULL, &timeout)) - return PTP_RC_OK; + ret = select (params->evtfd+1, &infds, NULL, NULL, &timeout); + if (1 != ret) { + if (-1 == ret) { + gp_log (GP_LOG_DEBUG,"ptpip/event", "select returned error, errno is %d", errno); + return PTP_ERROR_IO; + } + return PTP_ERROR_TIMEOUT; + } ret = ptp_ptpip_evt_read (params, &hdr, &data); if (ret != PTP_RC_OK) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |