summaryrefslogtreecommitdiff
path: root/graphics/gphoto2
diff options
context:
space:
mode:
authorveego <veego@pkgsrc.org>2001-07-08 21:44:27 +0000
committerveego <veego@pkgsrc.org>2001-07-08 21:44:27 +0000
commitec8244251d7e788958ab44f607cd230da839c185 (patch)
treebf502bc73c17a601abe285df7572d1c5af5dde57 /graphics/gphoto2
parent92adfc2f1c23923596a6f3277bd63e946ad42f10 (diff)
downloadpkgsrc-ec8244251d7e788958ab44f607cd230da839c185.tar.gz
Patch from bugtracking system of gphoto:
http://sourceforge.net/tracker/index.php?func=detail&aid=438155&group_id=8874&atid=108874 Summary: gphoto2 leave DC240 in an unstable state Fetching a list of all the files on the DC240 camera leave the camera in an unstable state, making it hard to shutdown. Was applied in revision 1.4 to the ghoto2 source tree, plus an additional patch, so use this version and not the patch from above.
Diffstat (limited to 'graphics/gphoto2')
-rw-r--r--graphics/gphoto2/patches/patch-ae26
1 files changed, 26 insertions, 0 deletions
diff --git a/graphics/gphoto2/patches/patch-ae b/graphics/gphoto2/patches/patch-ae
new file mode 100644
index 00000000000..63fe3e5e29a
--- /dev/null
+++ b/graphics/gphoto2/patches/patch-ae
@@ -0,0 +1,26 @@
+$NetBSD: patch-ae,v 1.1 2001/07/08 21:44:27 veego Exp $
+
+--- camlibs/kodak/dc240/library.c 2001/01/22 21:25:24 1.3
++++ camlibs/kodak/dc240/library.c 2001/07/04 08:54:14 1.4
+@@ -378,7 +378,10 @@
+ free(p1);
+ free(p2);
+ x=2;
+- while (x < file->size) {
++ /* since directory entries are 20 bytes, it is possible that */
++ /* we find some garbage. Ignore it. TODO: check that there is */
++ /* not another bug involving reading this info */
++ while ((x < file->size) && (file->size - x >= 20)) {
+ if ((file->data[x] != '.') &&
+ (attrib == (unsigned char)file->data[x+11])) {
+ /* Files have attrib 0x00, Folders have attrib 0x10 */
+@@ -448,6 +451,9 @@
+
+ free(cmd_packet);
+ free(path_packet);
++
++ strcpy(file->name, filename);
++ strcpy(file->type, "image/jpeg");
+
+ return (retval);
+ }