From cf154a3d81fcd4b6ce12c57f428c2e712607e109 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 24 Sep 2022 09:10:47 +0200 Subject: report storereadonly instead of generalerror, as generalerror is ignored in our ptp stack. https://github.com/gphoto/libgphoto2/issues/835 --- libgphoto2_port/vusb/vcamera.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libgphoto2_port') 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; -- cgit v1.2.1