diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-05-24 18:01:24 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-05-24 18:01:24 +0200 |
commit | dc40e20d667e93347c2e7a90e3aef3503f73fbb2 (patch) | |
tree | e91fd80ca8f069c0cc14f832741914d4a924bd3c | |
parent | d43a157bdb20d8492d87eef2ee32c2c445c79128 (diff) | |
download | libgphoto2-dc40e20d667e93347c2e7a90e3aef3503f73fbb2.tar.gz |
wait_for_event always used 65 seconds timeout for Olympus ... not the passed in timeout.
fixes https://github.com/gphoto/gphoto2/issues/305
also helps https://github.com/gphoto/gphoto2/issues/310
-rw-r--r-- | camlibs/ptp2/library.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index a76665f35..c9bf7f1c9 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -6197,11 +6197,13 @@ sonyout: sprintf (*eventdata, "PTP Property %04x changed to 0x%08x", event.Param1, event.Param2); return GP_OK; default: - GP_LOG_D ("unexpected unhandled event Code %04x, Param 1 %08x", event.Code, event.Param1); - break; + *eventtype = GP_EVENT_UNKNOWN; + C_MEM (*eventdata = malloc(strlen("PTP Event 0123, Param1 01234567")+1)); + sprintf (*eventdata, "PTP Event %04x, Param1 %08x", event.Code, event.Param1); + return GP_OK; } } - } while (waiting_for_timeout (&back_off_wait, event_start, 65000)); /* wait for 65 seconds after busy is no longer signaled */ + } while (waiting_for_timeout (&back_off_wait, event_start, timeout)); downloadomdfile: C_MEM (path = malloc(sizeof(CameraFilePath))); |