Correctly report errors when performing USB control transfers (bug #1201048).
Resolves: rhbz#1201048
This commit is contained in:
parent
47bac35de7
commit
f5ceca94e5
20
libgphoto2-usb-result.patch
Normal file
20
libgphoto2-usb-result.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -up libgphoto2-2.5.7/libgphoto2_port/libusb1/libusb1.c.usb-result libgphoto2-2.5.7/libgphoto2_port/libusb1/libusb1.c
|
||||
--- libgphoto2-2.5.7/libgphoto2_port/libusb1/libusb1.c.usb-result 2014-12-06 13:09:06.000000000 +0000
|
||||
+++ libgphoto2-2.5.7/libgphoto2_port/libusb1/libusb1.c 2015-03-12 11:01:26.746472288 +0000
|
||||
@@ -545,13 +545,14 @@ gp_port_usb_check_int (GPPort *port, cha
|
||||
static int
|
||||
gp_port_generic_usb_msg(GPPort *port, int request, int value, int index, char *bytes, int size, int flags, int default_error)
|
||||
{
|
||||
+ int handled;
|
||||
C_PARAMS (port && port->pl->dh);
|
||||
|
||||
- C_LIBUSB (libusb_control_transfer (port->pl->dh, flags, request, value, index,
|
||||
+ C_LIBUSB (handled = libusb_control_transfer (port->pl->dh, flags, request, value, index,
|
||||
(unsigned char*)bytes, size, port->timeout),
|
||||
default_error);
|
||||
|
||||
- return GP_OK;
|
||||
+ return handled;
|
||||
}
|
||||
|
||||
static int
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: libgphoto2
|
||||
Version: 2.5.7
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Library for accessing digital cameras
|
||||
Group: Development/Libraries
|
||||
# GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
|
||||
@ -13,6 +13,7 @@ Patch1: gphoto2-pkgcfg.patch
|
||||
Patch2: gphoto2-storage.patch
|
||||
Patch3: gphoto2-ixany.patch
|
||||
Patch4: gphoto2-device-return.patch
|
||||
Patch5: libgphoto2-usb-result.patch
|
||||
BuildRequires: libusbx-devel
|
||||
BuildRequires: lockdev-devel
|
||||
BuildRequires: libexif-devel
|
||||
@ -53,6 +54,7 @@ use libgphoto2.
|
||||
%patch2 -p1 -b .storage
|
||||
%patch3 -p1 -b .ixany
|
||||
%patch4 -p1 -b .device-return
|
||||
%patch5 -p1 -b .usb-result
|
||||
|
||||
for i in AUTHORS ChangeLog COPYING libgphoto2_port/AUTHORS libgphoto2_port/COPYING.LIB `find -name 'README.*'`; do
|
||||
mv ${i} ${i}.old
|
||||
@ -142,6 +144,10 @@ rm -rf %{buildroot}%{_defaultdocdir}/%{name}
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Thu Mar 12 2015 Tim Waugh <twaugh@redhat.com> 2.5.7-2
|
||||
- Apply upstream patch to correctly report errors when performing
|
||||
USB control transfers (bug #1201048).
|
||||
|
||||
* Tue Jan 20 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.5.7-1
|
||||
- Update to 2.5.7 for new device support
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user