diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c index cb01ae3ed..445e74a5c 100644 --- a/camlibs/ptp2/ptp.c +++ b/camlibs/ptp2/ptp.c @@ -2134,6 +2134,24 @@ store_event: if (ret == PTP_RC_OK) { ptp_debug (params, "event: nparams=0x%X, code=0x%X, trans_id=0x%X, p1=0x%X, p2=0x%X, p3=0x%X", event.Nparam,event.Code,event.Transaction_ID, event.Param1, event.Param2, event.Param3); ptp_add_event (params, &event); + + /* handle some PTP stack internal events */ + switch (event.Code) { + case PTP_EC_DevicePropChanged: { + unsigned int i; + + /* mark the property for a forced refresh on the next query */ + for (i=0;inrofdeviceproperties;i++) + if (params->deviceproperties[i].desc.DevicePropertyCode == event.Param1) { + params->deviceproperties[i].timestamp = 0; + break; + } + break; + } + default: /* check if we should handle it internally too */ + break; + } + } if (ret == PTP_ERROR_TIMEOUT) /* ok, just new events */ ret = PTP_RC_OK;