packages: sane-backends/sane-backends.spec, sane-backends/xerox_mfp_fix_usb...
jajcus
jajcus at pld-linux.org
Fri Sep 30 11:01:02 CEST 2011
Author: jajcus Date: Fri Sep 30 09:01:02 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- xerox_mfp_fix_usb_devices.patch patch from Debian (fixes Samsung SCX-4300 for me)
- Release: 5
---- Files affected:
packages/sane-backends:
sane-backends.spec (1.137 -> 1.138) , xerox_mfp_fix_usb_devices.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/sane-backends/sane-backends.spec
diff -u packages/sane-backends/sane-backends.spec:1.137 packages/sane-backends/sane-backends.spec:1.138
--- packages/sane-backends/sane-backends.spec:1.137 Sat Aug 27 17:34:40 2011
+++ packages/sane-backends/sane-backends.spec Fri Sep 30 11:00:56 2011
@@ -11,7 +11,7 @@
Summary(pt_BR.UTF-8): SANE - acesso a scanners locais e em rede
Name: sane-backends
Version: 1.0.22
-Release: 4
+Release: 5
License: relaxed GPL v2+ (libraries), Public Domain (docs)
Group: Libraries
Source0: ftp://ftp.sane-project.org/pub/sane/%{name}-%{version}/sane-backends-%{version}.tar.gz
@@ -22,6 +22,7 @@
Patch1: %{name}-mustek-path.patch
Patch2: %{name}-spatc.patch
Patch4: %{name}-link.patch
+Patch5: http://patch-tracker.debian.org/patch/series/dl/sane-backends/1.0.22-6/xerox_mfp_fix_usb_devices.patch
URL: http://www.sane-project.org/
BuildRequires: autoconf >= 2.54
BuildRequires: automake
@@ -248,6 +249,7 @@
%patch1 -p1
%patch2 -p1
%patch4 -p1
+%patch5 -p1
%build
%{__libtoolize}
@@ -627,6 +629,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.138 2011/09/30 09:00:56 jajcus
+- xerox_mfp_fix_usb_devices.patch patch from Debian (fixes Samsung SCX-4300 for me)
+- Release: 5
+
Revision 1.137 2011/08/27 15:34:40 arekm
- release 4
================================================================
Index: packages/sane-backends/xerox_mfp_fix_usb_devices.patch
diff -u /dev/null packages/sane-backends/xerox_mfp_fix_usb_devices.patch:1.1
--- /dev/null Fri Sep 30 11:01:02 2011
+++ packages/sane-backends/xerox_mfp_fix_usb_devices.patch Fri Sep 30 11:00:56 2011
@@ -0,0 +1,67 @@
+commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7
+Author: Alex Belkin <abc at telekom.ru>
+Date: Tue Mar 8 17:57:19 2011 +0300
+
+ keep usb device by default (correct for bug introduced by tcp sub-backend
+
+diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c
+index e08b50f..d4672a7 100644
+--- a/backend/xerox_mfp.c
++++ b/backend/xerox_mfp.c
+@@ -37,10 +37,10 @@
+ static const SANE_Device **devlist = NULL; /* sane_get_devices array */
+ static struct device *devices_head = NULL; /* sane_get_devices list */
+
+-transport available_transports[] = {
++enum { TRANSPORT_USB, TRANSPORT_TCP, TRANSPORTS_MAX };
++transport available_transports[TRANSPORTS_MAX] = {
+ { "usb", usb_dev_request, usb_dev_open, usb_dev_close, usb_configure_device },
+ { "tcp", tcp_dev_request, tcp_dev_open, tcp_dev_close, tcp_configure_device },
+- { 0 }
+ };
+
+ static int resolv_state(int state)
+@@ -824,7 +824,13 @@ free_devices (void)
+ devices_head = NULL;
+ }
+
+-/* SANE API ignores return code of this callback */
++static transport *tr_from_devname(SANE_String_Const devname)
++{
++ if (strncmp("tcp", devname, 3) == 0)
++ return &available_transports[TRANSPORT_TCP];
++ return &available_transports[TRANSPORT_USB];
++}
++
+ static SANE_Status
+ list_one_device (SANE_String_Const devname)
+ {
+@@ -839,12 +845,7 @@ list_one_device (SANE_String_Const devname)
+ return SANE_STATUS_GOOD;
+ }
+
+- for (tr = available_transports; tr->ttype; tr++) {
+- if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
+- break;
+- }
+- if (!tr->ttype)
+- return SANE_STATUS_INVAL;
++ tr = tr_from_devname(devname);
+
+ dev = calloc (1, sizeof (struct device));
+ if (dev == NULL)
+@@ -878,13 +879,7 @@ list_one_device (SANE_String_Const devname)
+ static SANE_Status
+ list_conf_devices (UNUSED (SANEI_Config * config), const char *devname)
+ {
+- transport *tr;
+-
+- for (tr = available_transports; tr->ttype; tr++) {
+- if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
+- return tr->configure_device(devname, list_one_device);
+- }
+- return SANE_STATUS_INVAL;
++ return tr_from_devname(devname)->configure_device(devname, list_one_device);
+ }
+
+ SANE_Status
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/sane-backends/sane-backends.spec?r1=1.137&r2=1.138&f=u
More information about the pld-cvs-commit
mailing list