Loading mtp/MtpStorage.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ int MtpStorage::getObjectInfo(MtpObjectHandle handle, MtpObjectInfo& info) { return 0; } } MTPE("MtpStorage::getObjectInfo no object found, error!\n"); // Item is not on this storage device return -1; } Loading Loading @@ -290,7 +290,7 @@ int MtpStorage::getObjectFilePath(MtpObjectHandle handle, MtpString& outFilePath goto end; } } MTPE("MtpStorage::getObjectFilePath fauled to find handle: %i\n", handle); // Item is not on this storage return -1; end: outFormat = MTP_FORMAT_ASSOCIATION; Loading Loading @@ -440,7 +440,6 @@ int MtpStorage::deleteFile(MtpObjectHandle handle) { goto end; } } MTPE("MtpStorage::deleteFile deleting handle: %d FAILED\n", handle); return -1; end: if (local_parent_id) { Loading Loading @@ -556,7 +555,7 @@ int MtpStorage::getObjectPropertyList(MtpObjectHandle handle, uint32_t format, u } } else { MTPE("MtpStorage::getObjectPropertyList unsupported property %x\n", property); // Either the property is not supported or the handle is not on this storage return -1; } Loading Loading @@ -653,7 +652,7 @@ int MtpStorage::renameObject(MtpObjectHandle handle, std::string newName) { } } } MTPE("MtpStorage::renameObject handle / node not found, error!\n"); // handle not foudn on this storage return -1; } Loading @@ -680,7 +679,7 @@ int MtpStorage::getObjectPropertyValue(MtpObjectHandle handle, MtpObjectProperty return 0; } } MTPE("MtpStorage::getObjectPropertyValue unable to locate handle: %i\n", handle); // handle not found on this storage return -1; } pthread_t MtpStorage::inotify(void) { Loading mtp/mtp_MtpDatabase.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ MtpResponseCode MyMtpDatabase::getObjectPropertyValue(MtpObjectHandle handle, MtpDataPacket& packet) { MTPD("MyMtpDatabase::getObjectPropertyValue mtpid: %i, property: %x\n", handle, property); int type; MtpResponseCode result; MtpResponseCode result = MTP_RESPONSE_INVALID_OBJECT_HANDLE; uint64_t longValue; if (!getObjectPropertyInfo(property, type)) { MTPE("MyMtpDatabase::setObjectPropertyValue returning MTP_RESPONSE_OBJECT_PROP_NOT_SUPPORTED\n"); Loading @@ -336,6 +336,11 @@ MtpResponseCode MyMtpDatabase::getObjectPropertyValue(MtpObjectHandle handle, } } if (result != MTP_RESPONSE_OK) { MTPE("MyMtpDatabase::setObjectPropertyValue unable to locate handle: %i\n", handle); return MTP_RESPONSE_INVALID_OBJECT_HANDLE; } // special case date properties, which are strings to MTP // but stored internally as a uint64 if (property == MTP_PROPERTY_DATE_MODIFIED || property == MTP_PROPERTY_DATE_ADDED) { Loading Loading
mtp/MtpStorage.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ int MtpStorage::getObjectInfo(MtpObjectHandle handle, MtpObjectInfo& info) { return 0; } } MTPE("MtpStorage::getObjectInfo no object found, error!\n"); // Item is not on this storage device return -1; } Loading Loading @@ -290,7 +290,7 @@ int MtpStorage::getObjectFilePath(MtpObjectHandle handle, MtpString& outFilePath goto end; } } MTPE("MtpStorage::getObjectFilePath fauled to find handle: %i\n", handle); // Item is not on this storage return -1; end: outFormat = MTP_FORMAT_ASSOCIATION; Loading Loading @@ -440,7 +440,6 @@ int MtpStorage::deleteFile(MtpObjectHandle handle) { goto end; } } MTPE("MtpStorage::deleteFile deleting handle: %d FAILED\n", handle); return -1; end: if (local_parent_id) { Loading Loading @@ -556,7 +555,7 @@ int MtpStorage::getObjectPropertyList(MtpObjectHandle handle, uint32_t format, u } } else { MTPE("MtpStorage::getObjectPropertyList unsupported property %x\n", property); // Either the property is not supported or the handle is not on this storage return -1; } Loading Loading @@ -653,7 +652,7 @@ int MtpStorage::renameObject(MtpObjectHandle handle, std::string newName) { } } } MTPE("MtpStorage::renameObject handle / node not found, error!\n"); // handle not foudn on this storage return -1; } Loading @@ -680,7 +679,7 @@ int MtpStorage::getObjectPropertyValue(MtpObjectHandle handle, MtpObjectProperty return 0; } } MTPE("MtpStorage::getObjectPropertyValue unable to locate handle: %i\n", handle); // handle not found on this storage return -1; } pthread_t MtpStorage::inotify(void) { Loading
mtp/mtp_MtpDatabase.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ MtpResponseCode MyMtpDatabase::getObjectPropertyValue(MtpObjectHandle handle, MtpDataPacket& packet) { MTPD("MyMtpDatabase::getObjectPropertyValue mtpid: %i, property: %x\n", handle, property); int type; MtpResponseCode result; MtpResponseCode result = MTP_RESPONSE_INVALID_OBJECT_HANDLE; uint64_t longValue; if (!getObjectPropertyInfo(property, type)) { MTPE("MyMtpDatabase::setObjectPropertyValue returning MTP_RESPONSE_OBJECT_PROP_NOT_SUPPORTED\n"); Loading @@ -336,6 +336,11 @@ MtpResponseCode MyMtpDatabase::getObjectPropertyValue(MtpObjectHandle handle, } } if (result != MTP_RESPONSE_OK) { MTPE("MyMtpDatabase::setObjectPropertyValue unable to locate handle: %i\n", handle); return MTP_RESPONSE_INVALID_OBJECT_HANDLE; } // special case date properties, which are strings to MTP // but stored internally as a uint64 if (property == MTP_PROPERTY_DATE_MODIFIED || property == MTP_PROPERTY_DATE_ADDED) { Loading