increment capcnt even on storefull event

This commit is contained in:
Marcus Meissner
2015-12-13 20:13:35 +01:00
parent f8b714f676
commit cfb01b8b3f

View File

@@ -1057,7 +1057,7 @@ ptp_initiatecapture_write(vcamera *cam, ptpcontainer *ptp) {
/* Emit ObjectAdded event for the created folder */
ptp_inject_interrupt (cam, 80, 0x4002, 1, ptp_objectid, cam->seqnr); /* objectadded */
}
if (capcnt == 150) {
if (capcnt++ == 150) {
/* The start of the operation succeeds, but the memory runs full during it. */
ptp_inject_interrupt (cam, 100, 0x400A, 1, ptp_objectid, cam->seqnr); /* storefull */
ptp_response (cam, PTP_RC_OK, 0);