diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2022-09-24 09:10:47 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2022-09-24 09:10:47 +0200 |
commit | cf154a3d81fcd4b6ce12c57f428c2e712607e109 (patch) | |
tree | 6566fa293ad932ac8cce9c346960c38da868d99b /libgphoto2_port | |
parent | 3d038b90809964dc27a32b866bd3a12fc4eb93f8 (diff) | |
download | libgphoto2-cf154a3d81fcd4b6ce12c57f428c2e712607e109.tar.gz |
report storereadonly instead of generalerror, as generalerror is ignored in our ptp stack.
https://github.com/gphoto/libgphoto2/issues/835
Diffstat (limited to 'libgphoto2_port')
-rw-r--r-- | libgphoto2_port/vusb/vcamera.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libgphoto2_port/vusb/vcamera.c b/libgphoto2_port/vusb/vcamera.c index 4bc4e514f..106bf903b 100644 --- a/libgphoto2_port/vusb/vcamera.c +++ b/libgphoto2_port/vusb/vcamera.c @@ -205,6 +205,7 @@ ptp_response(vcamera *cam, uint16_t code, int nparams, ...) { #define PTP_RC_InvalidObjectFormatCode 0x200B #define PTP_RC_StoreFull 0x200C #define PTP_RC_ObjectWriteProtected 0x200D +#define PTP_RC_StoreReadOnly 0x200E #define PTP_RC_AccessDenied 0x200F #define PTP_RC_NoThumbnailPresent 0x2010 #define PTP_RC_StoreNotAvailable 0x2013 @@ -1122,8 +1123,8 @@ ptp_initiatecapture_write(vcamera *cam, ptpcontainer *ptp) { cur = cur->next; } if (!cur) { - gp_log (GP_LOG_ERROR,__FUNCTION__, "I do not have a JPG file in the store, can not proceed"); - ptp_response (cam, PTP_RC_GeneralError, 0); + gp_log (GP_LOG_ERROR,__FUNCTION__, "I do not have a JPG file in the store, can not proceed. reporting PTP_RC_StoreReadOnly."); + ptp_response (cam, PTP_RC_StoreReadOnly, 0); return 1; } dir = first_dirent; |