summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2013-01-20 20:19:04 +0000
committerMarcus Meissner <marcus@jet.franken.de>2013-01-20 20:19:04 +0000
commitab233a6646438a573acc7abdda8ec492914eff7d (patch)
tree79fe67490201872878cb57db771cdd100c86678a
parent6e8021a04d1fb9a6e9b024196a8d6e37ba3cd8db (diff)
downloadlibgphoto2-ab233a6646438a573acc7abdda8ec492914eff7d.tar.gz
do not shift the canon flags << 8
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14189 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--camlibs/ptp2/library.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index 35318db8a..6ea1e3ca9 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -4737,12 +4737,12 @@ read_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
free (xdata);
/* clear the "new" flag on Canons */
if ( (params->deviceinfo.VendorExtensionID == PTP_VENDOR_CANON) &&
- (ob->canon_flags & 0x2000) &&
+ (ob->canon_flags & 0x20) &&
ptp_operation_issupported(params,PTP_OC_CANON_SetObjectArchive)
) {
/* seems just a byte (0x20 - new) */
- ptp_canon_setobjectarchive (params, oid, (ob->canon_flags &~0x2000)>>8);
- ob->canon_flags &= ~0x2000;
+ ptp_canon_setobjectarchive (params, oid, ob->canon_flags & ~0x20);
+ ob->canon_flags &= ~0x20;
}
}
break;
@@ -4906,12 +4906,12 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
/* clear the "new" flag on Canons */
if ( (params->deviceinfo.VendorExtensionID == PTP_VENDOR_CANON) &&
- (ob->canon_flags & 0x2000) &&
+ (ob->canon_flags & 0x20) &&
ptp_operation_issupported(params,PTP_OC_CANON_SetObjectArchive)
) {
/* seems just a byte (0x20 - new) */
- ptp_canon_setobjectarchive (params, oid, (ob->canon_flags &~0x2000)>>8);
- ob->canon_flags &= ~0x2000;
+ ptp_canon_setobjectarchive (params, oid, ob->canon_flags &~0x20);
+ ob->canon_flags &= ~0x20;
}
break;
}
@@ -5185,7 +5185,7 @@ get_info_func (CameraFilesystem *fs, const char *folder, const char *filename,
if (params->deviceinfo.VendorExtensionID == PTP_VENDOR_CANON) {
info->file.fields |= GP_FILE_INFO_STATUS;
- if (ob->canon_flags & 0x2000)
+ if (ob->canon_flags & 0x20)
info->file.status = GP_FILE_STATUS_NOT_DOWNLOADED;
else
info->file.status = GP_FILE_STATUS_DOWNLOADED;
@@ -5678,7 +5678,7 @@ init_ptp_fs (Camera *camera, GPContext *context)
PTPObject *ob2;
ptp_object_want (params, ents[j].ObjectHandle, 0, &ob2);
- ob2->canon_flags = ents[j].Flags << 8;
+ ob2->canon_flags = ents[j].Flags;
}
}
}