diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-09-27 11:54:04 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-09-27 11:54:04 +0200 |
commit | c543490552df1fb205d3280429ced22968003244 (patch) | |
tree | 78b377b80f9739728ce8305cbab835d5445a8453 | |
parent | c9fd3635e42687378952d4c01d0e1ede4835cd42 (diff) | |
download | libgphoto2-c543490552df1fb205d3280429ced22968003244.tar.gz |
in fuji getenvets, reset the propcode timestamp for fetching
-rw-r--r-- | camlibs/ptp2/ptp.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c index 78f60b3a0..05b17fce3 100644 --- a/camlibs/ptp2/ptp.c +++ b/camlibs/ptp2/ptp.c @@ -356,7 +356,7 @@ static uint16_t fd_putfunc(PTPParams* params, void* private, unsigned long sendlen, unsigned char *data ) { - ssize_t written; + ssize_t written; PTPFDHandlerPrivate* priv = (PTPFDHandlerPrivate*)private; written = write (priv->fd, data, sendlen); @@ -5200,10 +5200,20 @@ ptp_fuji_getevents (PTPParams* params, uint16_t** events, uint16_t* count) for(i = 0; i < *count; i++) { + unsigned int j; + param = dtoh16a(&data[2 + 6 * i]); value = dtoh32a(&data[2 + 6 * i + 2]); (*events)[i] = param; ptp_debug(params, "param: %02x, value: %d ", param, value); + + /* reset the property cache entry for refetch ... */ + for (j=0;j<params->nrofdeviceproperties;j++) + if (params->deviceproperties[j].desc.DevicePropertyCode == param) + break; + if (j != params->nrofdeviceproperties) { + params->deviceproperties[j].timestamp = 0; + } } } } |