Hello community,

here is the log from the commit of package sane-backends for openSUSE:Factory 
checked in at 2012-02-10 17:19:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sane-backends (Old)
 and      /work/SRC/openSUSE:Factory/.sane-backends.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sane-backends", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/sane-backends/sane-backends.changes      
2011-11-21 15:50:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.sane-backends.new/sane-backends.changes 
2012-02-10 17:19:44.000000000 +0100
@@ -1,0 +2,6 @@
+Sun Feb  5 20:18:31 UTC 2012 - [email protected]
+
+- add usb id for SCX4500W
+- fix usb device handling regression in xerox_mfp (bnc#745245)
+
+-------------------------------------------------------------------

New:
----
  sane-backends-1.0.21-SCX4500W.patch
  sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sane-backends.spec ++++++
--- /var/tmp/diff_new_pack.mg16AB/_old  2012-02-10 17:19:45.000000000 +0100
+++ /var/tmp/diff_new_pack.mg16AB/_new  2012-02-10 17:19:45.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package sane-backends
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -153,6 +153,10 @@
 # Patch104 removes descriptions-external/hpoj.desc from doc/Makefile.am
 # because it is intentionally removed from the sources in the prep section:
 Patch104:       no-descriptions-external-hpoj.patch
+# additional usb id
+Patch105:       sane-backends-1.0.21-SCX4500W.patch
+# fix usb device support in xerox_mfp (bnc#745245)
+Patch106:       sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch
 # Patch105 sane-backends-1.0.20-xerox_mfp.diff backports post 1.0.20 xerox_mfp 
changes
 # and is therefore removed since sane-backends-1.0.21 which contains those 
changes.
 # Install into this non-root directory (required when norootforbuild is used):
@@ -350,6 +354,8 @@
 # Patch104 removes descriptions-external/hpoj.desc from doc/Makefile.am
 # because it is intentionally removed from the sources in the prep section:
 %patch104
+%patch105 -p1
+%patch106 -p1
 # Source100... is SUSE specific stuff:
 # Remove hpoj.desc completely to avoid confusion with its successor hpaio.desc
 # because since openSUSE 10.3 the package hp-officeJet (for hpoj.desc) is 
dropped.

++++++ sane-backends-1.0.21-SCX4500W.patch ++++++
>From 0643804b4e76c0047df1d61ebee1adfe4696d9d4 Mon Sep 17 00:00:00 2001
From: Nils Philippsen <[email protected]>
Date: Wed, 3 Nov 2010 17:54:24 +0100
Subject: [PATCH] patch: SCX4500W

Squashed commit of the following:

commit d3d53225c2a5ee271141bd058e628ffa66d0c065
Author: Nils Philippsen <[email protected]>
Date:   Wed Nov 3 17:53:32 2010 +0100

    add USB id for SCX-4500W
---
 doc/descriptions/xerox_mfp.desc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/doc/descriptions/xerox_mfp.desc b/doc/descriptions/xerox_mfp.desc
index 406510f..6b8aa5f 100644
--- a/doc/descriptions/xerox_mfp.desc
+++ b/doc/descriptions/xerox_mfp.desc
@@ -48,6 +48,10 @@
 :usbid "0x04e8" "0x3426"
 :status :good
 
+:model "SCX-4500W"
+:interface "USB"
+:usbid "0x04e8" "0x342b"
+
 :model "CLX-3170fn"
 :interface "USB"
 :usbid "0x04e8" "0x342a"
-- 
1.7.3.2

++++++ sane-backends-1.0.22-xerox_mfp-fix-usb-devices.patch ++++++
>From 9792fb4ac11443553771d4f311a985333b503594 Mon Sep 17 00:00:00 2001
From: Nils Philippsen <[email protected]>
Date: Tue, 10 May 2011 10:22:02 +0200
Subject: [PATCH] patch: xerox_mfp-fix-usb-devices

Squashed commit of the following:

commit 962a5a657b750f99b274d58763667bd199f5cb5d
Author: Alex Belkin <[email protected]>
Date:   Tue Mar 8 17:57:19 2011 +0300

    keep usb device by default (correct for bug introduced by tcp sub-backend
    (cherry picked from commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7)
---
 backend/xerox_mfp.c |   27 +++++++++++----------------
 1 files changed, 11 insertions(+), 16 deletions(-)

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
-- 
1.7.5.1

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to