Skip to content

Commit

Permalink
fixed retry logic
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmeissner committed Sep 1, 2013
1 parent ef7df12 commit a4db4d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion camlibs/ptp2/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ ptp_usb_getpacket(PTPParams *params,
gp_log (GP_LOG_DEBUG, "ptp2/usbread", "Clearing halt on IN EP and retrying once.");
gp_port_usb_clear_halt (camera->port, GP_PORT_USB_ENDPOINT_IN);
/* retrying only makes sense if we did not read anything yet */
if ((tries++ < 1) && (result == 0))
if (tries++ < 1)
goto retry;
}
return PTP_ERROR_IO;
Expand Down

0 comments on commit a4db4d6

Please sign in to comment.